Skip to content
TORNLIFE More

test api key

Started by jscar [2091870] on in API Development.

11 replies · 166 views · thread synced · 6 days ago · View on torn.com
About this thread

Posts archived: 12 / 12 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
12
Discussion span
→
People posting
5
Likes on archived posts
4
Posts by staff, officers and moderators
4
Authority score
72 / 100
Historical score
22 / 100
Story score
30 / 100
Engagement score
54 / 100

Most-liked replies

jscar [2091870]

Is there a valid api key for testing developments? I'm trying to tie something down to use by my faction and want to know if my code is working but obv I can't test whether or not I'm NOT a member

For info I'm checking the the type of object returned from the api is not undefined but I think that only checks if the key is valid, not if they are actually a faction member or not
Bug [1455582] Committee Committee

I honestly couldn't tell you what it would say, but feel free to post your query here (without your API key) and I'm sure someone that's not in a faction could run it and paste the results :)
Bug [1455582] Committee Committee

Handy script, but anyone can run lookup a factions basic info, they don't need to be a faction member, and as such when I run I get the following:

"You are a member of Vault13"

I had a quick play around, and think the following tweaks should work fine:

https://pastebin.com/Nrz0r3Sm


jscar [2091870]

> but anyone can run lookup a factions basic info,

Oh no, I didn't think of that :)

Thanks for the tweak - all makes perfect sense.


tos [1976582]

As far as what is returned on error, there is a list at the bottom of the API page https://api.torn.com

In the case of a faction specific call but without faction access I believe you'd expect error 7:

7 => 'Incorrect ID-entity relation' : A requested selection is private (For example, personal data of another user / faction).