Upcoming API changes - Page 3 | API Development | TORN

Upcoming API changes

    • Ohadik [424017]
    • Role: Wiki Contributor
    • Level: 100
    • Posts: 10,787
    • Karma: 21,522
    • Last Action: 4 hours
      • 3
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:46:06 - 24/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello everyone,

    I would like to inform you about an upcoming minor change in the API v1.

    Per Ched's comment on this popular suggestion and following up on internal discussions, we have decided to remove the 'tokenrefills' and 'traveltime' fields from the 'user' -> 'personalstats' section.
    However, please note that these fields will only be removed from being visible to other players. You will still be able to access these fields for your own account using your own API key.

    The primary reason for this change is that these fields have been exploited in various mugging scripts, leading many players to believe that their API keys were leaked when, in fact, they were not.

    We understand that this change might not be welcomed by everyone, but it is necessary to ensure a fair gameplay experience for all.

    This change will likely take effect in the latter half of this week (this Thursday or Friday).

    Thank you for your understanding.

    Mauro

    Ohadik [424017]

    Took you bastards long enough. How many TRILLIONS have been stolen by illegal scripts abusing this? They should ALL be fedded.

     

    Something like a year and half or two years to do it after Chedburn said it? What the hell?

    GogetaD1 [1466443]

    g8 b8 m8, I r8 8/8

    Sorry I don't speak the talk that 13 year olds speak. 

     

    Try English next time. 

    6dC0F0l.png

    • DieselBlade [1701621]
    • Role: Wiki Contributor
    • Level: 56
    • Posts: 1,800
    • Karma: 1,676
    • Last Action: 2 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:54:28 - 24/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Pops [1025410]

    add this to the ever growing list of things removed from torn lol

     

    remove christmas town next, its a source of cans into the economy and this is eating into donator pack sales

    This wasn't exactly a feature though. It was more of an addon. Being able to stalk player activity, while potentially not even logged into Torn, is obviously unfair and overpowered 

    8db021b7-6a5d-4507-ab53-6ac6b2fa27de-1701621.gif

    • LusT [859510]
    • Role: Civilian
    • Level: 97
    • Posts: 638
    • Karma: 1,203
    • Last Action: 39 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:05:59 - 24/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    TL/DR: In the name of Donator Pack sales!

    c9MB3od.png

    • SamHain [2812583]
    • Role: Civilian
    • Level: 30
    • Posts: 50
    • Karma: 20
    • Last Action: 7 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:39:49 - 24/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    I rarely use my tokens, usually during Duke mission and then I'll get a refill towards merit then don't use them all.  Inevitably I get mugged for $0.  Lol

    • nex [2054500]
    • Role: Civilian
    • Level: 100
    • Posts: 4,409
    • Karma: 21,167
    • Last Action: 27 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 06:14:01 - 25/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Wow, not a decade too soon.

     

    Now remove the job points used and bounties placed and the "anonymous" claims in DA's Watchlist special and SYS bounty placements won't be complete bullshit.

    • VVoozy [2110553]
    • Role: Civilian
    • Level: 15
    • Posts: 1,944
    • Karma: 2,823
    • Last Action: 20 minutes
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:11:05 - 25/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello everyone,

    I would like to inform you about an upcoming minor change in the API v1.

    Per Ched's comment on this popular suggestion and following up on internal discussions, we have decided to remove the 'tokenrefills' and 'traveltime' fields from the 'user' -> 'personalstats' section.
    However, please note that these fields will only be removed from being visible to other players. You will still be able to access these fields for your own account using your own API key.

    The primary reason for this change is that these fields have been exploited in various mugging scripts, leading many players to believe that their API keys were leaked when, in fact, they were not.

    We understand that this change might not be welcomed by everyone, but it is necessary to ensure a fair gameplay experience for all.

    This change will likely take effect in the latter half of this week (this Thursday or Friday).

    Thank you for your understanding.

    Mauro

    Will this information be removed from the UI also or only from the API?

    wnc0y3N.gif

    • Wolverine [1971836]
    • Role: Civilian
    • Level: 100
    • Posts: 5,344
    • Karma: 6,139
    • Last Action: 11 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 12:58:00 - 25/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Mauro is an italian name: are you italian Splent?

    • Lollyn [2619037]
    • Role: Civilian
    • Level: 100
    • Posts: 787
    • Karma: 2,779
    • Last Action: Now
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 16:16:20 - 25/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Pops [1025410]

    add this to the ever growing list of things removed from torn lol

     

    remove christmas town next, its a source of cans into the economy and this is eating into donator pack sales

     

    You seem a little confused between the Spirit of Giving and the spirit of taking.

     

    JWw00vF.jpg

    • stax [1132977]
    • Role: Civilian
    • Level: 99
    • Posts: 1,407
    • Karma: 1,248
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:01:59 - 25/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello everyone,

    I would like to inform you about an upcoming minor change in the API v1.

    Per Ched's comment on this popular suggestion and following up on internal discussions, we have decided to remove the 'tokenrefills' and 'traveltime' fields from the 'user' -> 'personalstats' section.
    However, please note that these fields will only be removed from being visible to other players. You will still be able to access these fields for your own account using your own API key.

    The primary reason for this change is that these fields have been exploited in various mugging scripts, leading many players to believe that their API keys were leaked when, in fact, they were not.

    We understand that this change might not be welcomed by everyone, but it is necessary to ensure a fair gameplay experience for all.

    This change will likely take effect in the latter half of this week (this Thursday or Friday).

    Thank you for your understanding.

    Mauro

    Good. Those scripts were always pushing the limits (to me) of "just make something you could do yourself on the page more efficient" permissible scripting. I'd have been fine with it being a daily-updated stat too, but I'm in favor of any change that stops the silliness of a casino refill sending out a public flare to all scripters that this person is gambling.

    • Sharkhara [2752728]
    • Role: Civilian
    • Level: 93
    • Posts: 25
    • Karma: 18
    • Last Action: 9 minutes
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:18:34 - 25/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    🤣🤣🤣 Love the potential chaos this implies. 

     

    Seriously, this makes sense. Sure it's gonna suck for some. Can't please everyone, after all.

    • Alfred_E_Neuman [2386306]
    • Role: Civilian
    • Level: 20
    • Posts: 443
    • Karma: 258
    • Last Action: 4 hours
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:34:47 - 25/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Why any form of script was ever allowed is beyond me. 

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 835
    • Karma: 2,347
    • Last Action: 16 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:14:37 - 28/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello everyone,

    I would like to inform you about an upcoming minor change in the API v1.

    Per Ched's comment on this popular suggestion and following up on internal discussions, we have decided to remove the 'tokenrefills' and 'traveltime' fields from the 'user' -> 'personalstats' section.
    However, please note that these fields will only be removed from being visible to other players. You will still be able to access these fields for your own account using your own API key.

    The primary reason for this change is that these fields have been exploited in various mugging scripts, leading many players to believe that their API keys were leaked when, in fact, they were not.

    We understand that this change might not be welcomed by everyone, but it is necessary to ensure a fair gameplay experience for all.

    This change will likely take effect in the latter half of this week (this Thursday or Friday).

    Thank you for your understanding.

    Mauro

    This change is now live for the 'tokenrefills' section in 'user' -> 'personalstats'.
    Due to a popular request, we decided to leave the 'traveltime' section open to public, but it is now slightly changed. 

    The 'traveltime' under 'user' -> 'personalstats' API section now returns a rounded value for other players and the true value for your profile (rounded to nearest day / hour / minute).

    Some may have already noticed, but token refills have now also been hidden from personal stats page for other players, and in the same fashion, the "Time spent traveling" will likely be rounded both under Public Profile Stats & Hall of Fame pages as well.
    True value will still be visible when you're viewing just your own personal stats.

    Thanks! 

    Last edited by splent on 22:15:46 - 28/06/24 (8 months ago)

    ba624a17-d937-46f0-96eb-e7ed7d5951b1-2088243.jpg?v=1940629196397

    • SPGoding [2826456]
    • Role: Civilian
    • Level: 35
    • Posts: 481
    • Karma: 1,576
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 07:11:37 - 29/06/24 (8 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello everyone,

    I would like to inform you about an upcoming minor change in the API v1.

    Per Ched's comment on this popular suggestion and following up on internal discussions, we have decided to remove the 'tokenrefills' and 'traveltime' fields from the 'user' -> 'personalstats' section.
    However, please note that these fields will only be removed from being visible to other players. You will still be able to access these fields for your own account using your own API key.

    The primary reason for this change is that these fields have been exploited in various mugging scripts, leading many players to believe that their API keys were leaked when, in fact, they were not.

    We understand that this change might not be welcomed by everyone, but it is necessary to ensure a fair gameplay experience for all.

    This change will likely take effect in the latter half of this week (this Thursday or Friday).

    Thank you for your understanding.

    Mauro

    splent [2088243]

    This change is now live for the 'tokenrefills' section in 'user' -> 'personalstats'.
    Due to a popular request, we decided to leave the 'traveltime' section open to public, but it is now slightly changed. 

    The 'traveltime' under 'user' -> 'personalstats' API section now returns a rounded value for other players and the true value for your profile (rounded to nearest day / hour / minute).

    Some may have already noticed, but token refills have now also been hidden from personal stats page for other players, and in the same fashion, the "Time spent traveling" will likely be rounded both under Public Profile Stats & Hall of Fame pages as well.
    True value will still be visible when you're viewing just your own personal stats.

    Thanks! 

    It seems like this update makes every personalstats query of others return 'traveltime': 0 even when not included in selection.

     

    Could you fix it?😢

    • DieselBlade [1701621]
    • Role: Wiki Contributor
    • Level: 56
    • Posts: 1,800
    • Karma: 1,676
    • Last Action: 2 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 10:49:27 - 02/07/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Alfred_E_Neuman [2386306]

    Why any form of script was ever allowed is beyond me. 

    The issue before legal scripts is many more illegal scripts were prevalent.

     

    Also, using java script to navigate to a profile page to pull stats is illegal, so that is why the API was released

    8db021b7-6a5d-4507-ab53-6ac6b2fa27de-1701621.gif

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 835
    • Karma: 2,347
    • Last Action: 16 minutes
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:25:56 - 16/07/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Hello,

    Today brings new changes. There is now an OpenAPI documentation available for the new API v2 endpoints via Swagger: https://www.torn.com/swagger/index.html 


    Three new sections are now available in the API v2:
    - 'torn' -> 'crimes' which returns general information about all crimes
    - 'torn' -> 'subcrimes' which provides available actions for a specific crime
    - 'user' -> 'crimes' which returns user specific crimes 2.0 information for a specifc crime
    - (breaking) 'user' -> 'crimes' section also needs a key with "minimal" access (previously "public")

    Edit:
    I also added:
    - 'user' -> 'criminalrecord' which only requires 'public' key (as 'user' -> 'crimes' under v1 used to). 

    There's a caching issue where cached data is being returned for 'torn' > 'subcrimes' and 'user' -> 'crimes' sections which we're currently working on resolving.

    If you notice any errors or any incorrect information please don't hesitate to let me know! 

    Thank you.
     

    Last edited by splent on 11:29:13 - 18/07/24 (7 months ago)

    ba624a17-d937-46f0-96eb-e7ed7d5951b1-2088243.jpg?v=1940629196397

    • Allenone [2033011]
    • Role: Civilian
    • Level: 85
    • Posts: 213
    • Karma: 321
    • Last Action: 7 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:21:45 - 16/07/24 (8 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello,

    Today brings new changes. There is now an OpenAPI documentation available for the new API v2 endpoints via Swagger: https://www.torn.com/swagger/index.html 


    Three new sections are now available in the API v2:
    - 'torn' -> 'crimes' which returns general information about all crimes
    - 'torn' -> 'subcrimes' which provides available actions for a specific crime
    - 'user' -> 'crimes' which returns user specific crimes 2.0 information for a specifc crime
    - (breaking) 'user' -> 'crimes' section also needs a key with "minimal" access (previously "public")

    Edit:
    I also added:
    - 'user' -> 'criminalrecord' which only requires 'public' key (as 'user' -> 'crimes' under v1 used to). 

    There's a caching issue where cached data is being returned for 'torn' > 'subcrimes' and 'user' -> 'crimes' sections which we're currently working on resolving.

    If you notice any errors or any incorrect information please don't hesitate to let me know! 

    Thank you.
     

    The Swagger page implies that /user/?selections=crimes can be used to get "the details and statistics about a user's specific crime".

     

    Currently it only appears to work for your own crime details- I can't query a specific persons or a faction members- without getting an incorrect ID-entity relation error. ( using a limited access key from faction leader )

     

    Example query: https://api.torn.com/v2/user/2033011?selections=crimes&key=#############&id=7

     

    Are there plans any time soon to expose faction member crime related data to faction leaders? This will be vital with OC2.0 being planned to release by the end of the year.

    • Hemicopter [2780600]
    • Role: Civilian
    • Level: 78
    • Posts: 1,694
    • Karma: 4,101
    • Last Action: 47 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:39:59 - 16/07/24 (8 months ago)
    Post link copied to clipboard Copy post link

    - (breaking) 'user' -> 'crimes' section also needs a key with "minimal" access (previously "public")

    Can I ask, why? I don't see any reason why that would be necessary, it just is public information.

    • Allenone [2033011]
    • Role: Civilian
    • Level: 85
    • Posts: 213
    • Karma: 321
    • Last Action: 7 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:10:45 - 16/07/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Hemicopter [2780600]

    - (breaking) 'user' -> 'crimes' section also needs a key with "minimal" access (previously "public")

    Can I ask, why? I don't see any reason why that would be necessary, it just is public information.

    User > Crimes now contains more information than API v1 did. for example: 

     

    API v1 would just report your criminal records with some simple totals:

    dzCFJFZ.png

     

    API v2 User > crimes now indirectly reveals what you have in your inventory (Progression Bonus), and more importantly- rewards. This is a vulnerable point that I can see being the selling point on moving to min access. Given you could watch someone's reward money and make educated decisions on how much they have on hand based on when they're dumping (also detectable with nerve spent). 

    fNCB01e.png

    • Hemicopter [2780600]
    • Role: Civilian
    • Level: 78
    • Posts: 1,694
    • Karma: 4,101
    • Last Action: 47 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 07:58:17 - 17/07/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Hemicopter [2780600]

    - (breaking) 'user' -> 'crimes' section also needs a key with "minimal" access (previously "public")

    Can I ask, why? I don't see any reason why that would be necessary, it just is public information.

    Allenone [2033011]

    User > Crimes now contains more information than API v1 did. for example: 

     

    API v1 would just report your criminal records with some simple totals:

    dzCFJFZ.png

     

    API v2 User > crimes now indirectly reveals what you have in your inventory (Progression Bonus), and more importantly- rewards. This is a vulnerable point that I can see being the selling point on moving to min access. Given you could watch someone's reward money and make educated decisions on how much they have on hand based on when they're dumping (also detectable with nerve spent). 

    fNCB01e.png

    If we go with the statement that there would be minimal to no changes to v1, I would expect that the access levels of v1 and v2 can and should differ. The v1 user -> crimes is still public data, but there was a breaking change just for the "prerelease v2". 

     

    I feel like that could be at least discussed.

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 835
    • Karma: 2,347
    • Last Action: 16 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 09:22:39 - 17/07/24 (8 months ago)
    Post link copied to clipboard Copy post link

    Hemicopter [2780600]

    - (breaking) 'user' -> 'crimes' section also needs a key with "minimal" access (previously "public")

    Can I ask, why? I don't see any reason why that would be necessary, it just is public information.

    Allenone [2033011]

    User > Crimes now contains more information than API v1 did. for example: 

     

    API v1 would just report your criminal records with some simple totals:

    dzCFJFZ.png

     

    API v2 User > crimes now indirectly reveals what you have in your inventory (Progression Bonus), and more importantly- rewards. This is a vulnerable point that I can see being the selling point on moving to min access. Given you could watch someone's reward money and make educated decisions on how much they have on hand based on when they're dumping (also detectable with nerve spent). 

    fNCB01e.png

    Hemicopter [2780600]

    If we go with the statement that there would be minimal to no changes to v1, I would expect that the access levels of v1 and v2 can and should differ. The v1 user -> crimes is still public data, but there was a breaking change just for the "prerelease v2". 

     

    I feel like that could be at least discussed.

    Unfortunately, the system currently doesn't support different access levels between v1 and v2.

    However, I've now created a new section under v1 'user' -> 'criminalrecord' which only requires 'public' key (as 'user' -> 'crimes' under v1 used to). 

    https://api.torn.com/user/1322136?selections=criminalrecord&key=your_public_key

    I've definitely misjudged the use of 'user' -> 'crimes' section. I'll definitely be more careful around such changes in the future!

    Thanks for the feedback and sorry about the breaking change which came unannounced.

    ba624a17-d937-46f0-96eb-e7ed7d5951b1-2088243.jpg?v=1940629196397

Reply
Thread Title: