Skip to content
TORNLIFE More

API returning broken responses at random

Started by Omanpx [1906686] on in Bugs & Issues.

48 replies · 922 views · thread synced · 3 days ago · View on torn.com

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

Skeletron [318855]
I'm not sure if this could be an IP address related issue, but after back-to-back errors, I tried the same calls using Cloudflare WARP, and the errors disappeared.

Fetheryhorse6 [2317488] had the same issue last night and tried using a VPN, and the errors were gone for him too.

Mentions: Fetheryhorse6 [2317488]

DeKleineKobini [2114440] Committee Committee
Experiencing the same. Looking at the headers doesn't tell me anything, as everything except for the expected things (cf-ray and date) stayed the same.
TDup [2660552]
It's almost like if there was encryption in the result... Maybe someone enabled zip compression on a specific machine API endpoint config to reduce bandwidth? ;)
Davzz [323969] Admin Staff
If someone can reproduce this are they able to capture a full HAR file with the request and response please?
https://developers.cloudflare.com/support/troubleshooting/general-troubleshooting/gathering-information-for-troubleshooting-sites/

You can email this to alex@torn.com. Please sanitize it to remove your session IDs (see the blog above)
Davzz [323969] Admin Staff
^^ Thanks, i've got a handful of users - no need for more HAR files from new users (i'm emailing some of those users directly to ask for more tho!)
flare [2195157] Officer Officer
Everything seems good on my end. Ive had my sheet updating once a min for the last hour and haven't caught an error. Last one I see in logs was at 19:57:21tct
Flak [2091491]
API LEVEL Error?

I think you have an entirely seperate issue there. Its saying that the API key access level is not right?

I think you just need to use an API key with a higher level of permission.

AKA Public < Limited < Full


Is my best guess as to why its fixed for everyone else. Unless i'm reading this wrong.
flare [2195157] Officer Officer
Yup dire is right. If its a level error or this:

16 => Access level of this key is not high enough : A selection is being called of which this key does not have permission to access.

That means you are not using a key that has the correct level of permission to access whatever your trying to.

This thread was about JSON parse error/Invalid JSON error, cause by the api returning junk data like this:

[image: cdn.discordapp.com]

which has seemingly been resolved.