Skip to content
TORNLIFE More

Company - Error Code 7

Started by lonerider543 [2173471] on in API Development.

13 replies · 182 views · thread synced · 7 days ago · View on torn.com
About this thread

Posts archived: 14 / 14 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
14
Discussion span
→
People posting
6
Likes on archived posts
5
Posts by staff, officers and moderators
1
Authority score
72 / 100
Historical score
26 / 100
Story score
33 / 100
Engagement score
56 / 100

Most-liked replies

lonerider543 [2173471]
For the company section of the API I keep getting error code 7. Is that data only accessible by the company director? And if so, why?

Trying to develop script/tools that are company based is hard if you haven't got access to the API (even if the final script/tool is mean to be used by the company director).
lonerider543 [2173471]
That seems odd considering looking at the fields the only one that would be director only on torn itself would be 'applications'. - Though I don't know what data is held by 'detailed'.

Seems weird how we can access data just fine by browsing the company pages on Torn, yet the same data is restricted to director only on the API. Maybe it was an oversight when working on the API.
Stiny [992186]
I agree. It was a recent change that was implemented to remove it.
Detailed would reveal information such as advertising budget, stock, sell price, etc.
Detailed also reveals employee effectiveness and work stats.
PlatinumDevil [1920420]
{
"company_detailed": {
"ID": 83171,
"company_bank": xxxxx,
"popularity": xxxxx,
"efficiency": xxxxx,
"environment": xxxxx,
"trains_available": xxxxx,
"advertising_budget": xxxxx,
"upgrades": {
"company_size": xxxxx,
"staffroom_size": "xxxxx",
"storage_size": "xxxxx",
"storage_space": xxxxx
}
}
}

Almost all of the above information is unavailable to everyone other than those who are at least working for the company so it makes sense to have it hidden from people since there is already a level of privacy to the data.
lonerider543 [2173471]
Well yes, but I am trying to access data for my own company. Seems like the only one that should be director only is the applications section then.
PlatinumDevil [1920420]
Since your an employee and not a director I don't think you get access to that info via API since torn only seem to have the criteria of Director & Public access types
lonerider543 [2173471]
Needs another criteria then. Faction is special as well since you can get API permissions which gives access to faction API. Either need something similar for companies or just have the API accessible by employees as well as directors.

It really doesn't make sense that it is director only haha :D
Ahab [1735214]
Why does an employee need any of that data in an easy to log and alert way? if you want to make a tool go start your own company.
lonerider543 [2173471]
A bit much to start a company just to make a script? It's not like it's free to do so and you'd also have to leave your current company etc. A lot of effort that shouldn't be there.
PlatinumDevil [1920420]
You don't need to run a company to test script, during development couldn't you just fake the API call from something like a JSON file and have all the needed parameters in the JSON file call it from that and it works from the then it should work from an API fetch. Then all you would need if for a company director to share the basic layout of the API fetch results so that you can manipulate the fields to test it. (Hope that makes a modicum of sense.
lonerider543 [2173471]
That is correct, but that requires another person still that is able to send the basic layout to you.

I am just thinking it should be a lot more user friendly, especially since there is no reason not to. Surely it wouldn't take a lot of effort to check if you are part of the company and if so allow access to that data.

I am not asking them to make a whole permissions setup in the same way it is done for factions (which I also don't quite understand why we need that for the API), just simply let employees access the data. They can see it on Torn itself anyway, so it's not like they are getting data they shouldn't be able to access.

If there is any good reason why it has to be this way then fair play, but I cannot see one lol
tonyuh [2093883]
Company APIs were usable by anyone in the company until they changed it around end of May, now only the director can access this info. Which is weird since you can see this info on the company's page even if you are not the director anyway.