Skip to content
TORNLIFE More

AppID

Started by McNeo [864688] on in API Development.

8 replies · 57 views · thread synced · 6 days ago · View on torn.com
About this thread

Posts archived: 9 / 9 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
9
Discussion span
→
People posting
2
Likes on archived posts
1
Authority score
51 / 100
Historical score
17 / 100
Story score
25 / 100
Engagement score
44 / 100
McNeo [864688]

Any thought of adding an AppID to the API queries?My line of thought is this... Developers could "register" their apps with you, or simply request an AppID with no actually registration on your end. Then, when an API request is made with an AppID that AppID is logged with the request.If server load gets to be too much or there's a security risk or whatever you could then block requests from certain AppIDs or requests that are missing an AppID.In addition to blocking an AppID, perhaps down the road it could even be used to assign different permissions. Example would be: Right now every user gets 100 queries per minute. Perhaps it would be useful to say each app gets 30 queries per minute per user. Or a specific app's queries don't count towards the 100 max (like CityWatch).
McNeo [864688]

So just add "&useragent=[whatever]" on the end of my query?

Not sure if they track that, but I've seen this so I supposed that's some sort of standard, so if they ever were to I suppose this is what they may look at.
Meme_Raven [1891116]

What language are you coding in?

In PHP I believe it's
ini_set("user_agent","YOUR_USER_AGENT_STRING");

Then call your request as usual

Python 2.7 - use urllib2()

addheaders = [('User-agent', 'YOUR_USER_AGENT_STRING')]
McNeo [864688]

I'm using .net and my queries are simply using a webpage source code return, so the same thing you'd punch into a web browser to get the data.
Meme_Raven [1891116]

Then it would still stand by using a custom user-string - anything that leave that program to access the web will be using a user-string and you should be able to over-ride it by configuration or variable.
McNeo [864688]

Perfect, using your replies I drummed up the right keywords to find what I needed on MSDN to do this. Thank you, sir.