It seems that there is some sort of cached response with certain API url formats. Below is the format in question.
Given a key, this call will return info for the owner of the key. However, if the call is made shortly after with a different key, the incorrect user is returned.
Having 0 as the ID for this type of call is obviously not best practice. but it's clearly valid as it will return the correct data the first time. Removing the user ID allows this API call to return the correct data every time. However, inconsistent behavior in the API definitely seems quite buggy.
Reproduction steps:
Call the URl above with two different API keys in short succession. The data will likely be identical.
After, remove the 0 from the URL. Following the same tests, you no longer get duplicated data.
https://api.torn.com/user/0?selections=basic&key=Given a key, this call will return info for the owner of the key. However, if the call is made shortly after with a different key, the incorrect user is returned.
Having 0 as the ID for this type of call is obviously not best practice. but it's clearly valid as it will return the correct data the first time. Removing the user ID allows this API call to return the correct data every time. However, inconsistent behavior in the API definitely seems quite buggy.
Reproduction steps:
Call the URl above with two different API keys in short succession. The data will likely be identical.
After, remove the 0 from the URL. Following the same tests, you no longer get duplicated data.