• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Abhishek Tanwar

I build web & mobile experiences

  • HOME
  • BLOG
  • CONTACT ME
  • DISCLAIMER & COPYRIGHTS
You are here: Home / Uncategorized / ASync Calls to Dota2/Steam APIs

ASync Calls to Dota2/Steam APIs

May 20, 2015 by Abhishek Tanwar

Hello folks.

I am currently in process of putting around a Web version of my last app for Dota2 Stats on iOS. BTW, the developing the same using Adobe Flash Buildier 4.7. While building, I notice that there are lot of features that work on a mobile app or a AIR app which actually dont on Web version.

It is actually not the problem with Flash/Adobe but instead it is a standard security issue that I have come across as a first notice when I deploy the application on server. Tricky part is it works perflectly fine when I test it locally. So here is the issue.

Issue

When any application(web) tries to call a REST API which is not in the same domain, excluding localhost, there should be an access granted on the target side to allow the request. We call this cross domain request. Obviously I don’t own the Dota2 Steam API server to change it :), so I was stuck with that issue.

 

Breaking my head

So as normal, I starting breaking my head with what the hell is wrong with my code and why is this not working on a standard webserver which is not localhost. After making cracks in my head, I came to realize that it is actually not my code by the server side who is not allowing the access and that too because this is not a local server. So, once I realize the problem, the solution was easy.

 

The solution (ointment to my headache)

The solution is just a security aspect which either has to be a cross domain mapping entry in Steam Dota2 Valve API server or a proxy at my end to enable the same.

So finally, I created a simple PHP proxy generic script which can be used to call the Steam Dota2 Web APIs.

For reference & open use,  I have hosted the same on my server which you can use and also download and put on your local server if you want.

Two versions are there:

  1. XML Version -> Accepts a parameter “url” which is steam dota2 web api url with all parameters encoded and returns the output of the API in XML format [WebAPIProxy_JSON.php]
  2. JSON Version -> Accepts a parameter “url” which is steam dota2 web api url with all parameters encoded and returns the output of the API in JSON format. [WebAPIProxy_XML.php]

Feel free to ask any clarifications or share you views on developing apps around the Steam Dota2 API.

BTW, here is a link to iOS app [GameStats] and the facebook page [GameStats-FB]. Feel free to drop by.

Share this:

  • Facebook
  • X

Like this:

Like Loading...

Filed Under: Uncategorized Tagged With: cross domain, cross domain call, cross domain dota2 api, cross domain steam api, dota2 api, Steam, steam api

Primary Sidebar

  • Behance
  • Email
  • Facebook
  • GitHub
  • LinkedIn

Popular Posts

How To Integrate React in JSP Application
SaaS, PaaS, IaaS
XQuery highlighting in Notepad++
Standard Design Patterns – Applied to JAVA
XQDT Installation on Eclipse JUNO

Categories

  • Building APIs
  • Building Mobile Apps
  • Building Web Apps
  • Coding Challenges
  • Extensions
  • Fullstack
  • Patterns
  • Tips & Tricks
  • Uncategorized
  • VSCode

Tags

2022 vscode extensions Abstract Factory alienware amazing vscode extensions apple challenges coding coding-challenges Design Patterns dota2 dota2 items dynamic web service call dynamic webservice invocation enterprise integration express flex helpful vscode extensions how to implement mfa in nodejs increasing productivity using vscode integration pattern macro message channel message endpoint message pattern message router message translator messaging mfa offline action processing offline actions in struts pipes and filters PRG in struts react Steam struts System Emulator threads in struts utilities vscode vscode customization vscode extensions vscode productivity extensions xquery xquery 1.0 xquery design principles

Recent Posts

  • 15+ VSCode Extensions To Improve Your Productivity
  • Productivity and Quality Extensions for ReactJS in VSCode..
  • My goto VSCode plugins for 2022…
  • How to enable MFA for your application in Node.JS?
  • Structuring Express Application – How I do it?

Categories

  • Building APIs (8)
  • Building Mobile Apps (1)
  • Building Web Apps (7)
  • Coding Challenges (3)
  • Extensions (1)
  • Fullstack (6)
  • Patterns (8)
  • Tips & Tricks (41)
  • Uncategorized (43)
  • VSCode (2)

Tags

2022 vscode extensions Abstract Factory alienware amazing vscode extensions apple challenges coding coding-challenges Design Patterns dota2 dota2 items dynamic web service call dynamic webservice invocation enterprise integration express flex helpful vscode extensions how to implement mfa in nodejs increasing productivity using vscode integration pattern macro message channel message endpoint message pattern message router message translator messaging mfa offline action processing offline actions in struts pipes and filters PRG in struts react Steam struts System Emulator threads in struts utilities vscode vscode customization vscode extensions vscode productivity extensions xquery xquery 1.0 xquery design principles

Archives

  • August 2023 (1)
  • March 2022 (1)
  • February 2022 (1)
  • November 2020 (1)
  • April 2020 (2)
  • May 2019 (1)
  • April 2019 (1)
  • March 2019 (1)
  • December 2018 (1)
  • July 2018 (4)
  • June 2018 (3)
  • March 2018 (1)
  • May 2016 (1)
  • December 2015 (1)
  • May 2015 (1)
  • April 2015 (2)
  • March 2015 (1)
  • December 2014 (2)
  • November 2014 (2)
  • October 2014 (1)
  • August 2014 (2)
  • July 2014 (1)
  • April 2014 (1)
  • March 2014 (1)
  • February 2014 (2)
  • January 2014 (1)
  • December 2013 (4)
  • November 2013 (4)
  • October 2013 (3)
  • September 2013 (4)
  • August 2013 (2)
  • July 2013 (5)
  • June 2013 (9)
  • May 2013 (6)
  • April 2013 (2)
  • March 2013 (2)
  • January 2013 (1)
  • November 2012 (2)
  • HOME
  • BLOG
  • CONTACT ME
  • DISCLAIMER & COPYRIGHTS

Copyright © 2025

%d