API Faction keys | API Development | TORN

API Faction keys

    • pobk [3171827]
    • Role: Civilian
    • Level: 52
    • Posts: 110
    • Karma: 156
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 14:56:09 - 07/09/24 (3 months ago)
    |
    Last replied 18:06:11 - 06/11/24 (1 month ago)

    GO UPVOTE THE SUGGESTION: Faction API Keys

    I'm going to drop this here as a point of discussion...

     

    Could we look into creating faction level keys. Keys that aren't linked to a specific user, but instead a faction.

     

    I'm currently managing keys for multiple users to poll data from multiple monarch family faction members for retals. The problem here, is that people keep moving around... 

     

    I mean one-fix would be to not move people around, but then that doesn't fix the other issue which is when members go long-term unavailable and as such their API keys are disabled.

     

    I think API keys generated and linked to factions instead of users would be of significant benefit here.

     

    What are others thoughts on this?

    Last edited by pobk on 20:00:42 - 03/11/24 (1 month ago)

    ~ P

    Support my suggestions: Faction API Keys

    • Omanpx [1906686]
    • Role: Civilian
    • Level: 100
    • Posts: 2,455
    • Karma: 15,759
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:44:11 - 07/09/24 (3 months ago)
    Post link copied to clipboard Copy post link

    Can second that, it's annoying when the key owner goes guesting or inactive and you forget about some tool that was using their key, only realizing once something stops working :(

    Toolbox - a collection of my tools and spreadsheets made for Torn.

    Guidebook - a collection of guides i made for Torn.

    • Flid [2594918]
    • Role: Civilian
    • Level: 100
    • Posts: 677
    • Karma: 671
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:14:41 - 17/09/24 (2 months ago)
    Post link copied to clipboard Copy post link

    I had exactly this issue with a module in my bot that reports faction vault transactions in discord. User leaves and joins another faction, we were seeing EVERYTHING that the faction did, especially with larger armounts. 

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 736
    • Karma: 2,032
    • Last Action: 4 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:08:07 - 17/09/24 (2 months ago)
    Post link copied to clipboard Copy post link

    I think it's a good idea, but it's not entirely up to me.

    The question is how would these keys be managed, but I'm guessing it would be a new section here (either in "Control" or "Faction Modification"), called "API Keys"?
    c533a771-e6da-4640-8cab-4e5777184429-2088243.png

    And I'm guessing these keys would only have access to non-public faction selections?

     

    • lonerider543 [2173471]
    • Role: Civilian
    • Level: 100
    • Posts: 170
    • Karma: 135
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:50:53 - 18/09/24 (2 months ago)
    Post link copied to clipboard Copy post link

    Great idea, I also had this issue where key owners have gone guesting and it broke stuff I made.

     

    Putting it in the Control section seems appropriate. Maybe the Faction API perms can also be reworked to instead give access to that section and allow the users to control the API key(s) for the faction instead.

     

    Only issue I could think of is that presumably each faction will be limited to the usual 100 calls per minute (just like a single user would), whereas currently multiple users could contribute to a pool of API keys for members of the faction so it would be possible currently to make more than 100 calls per faction. If this was changed to being per faction rather than per user this would not be possible anymore. But not sure if anyone really would need that many calls specific to the faction.

     

    Maybe as a compromise, given that there aren't as many factions as there are users and given the limitation that a faction API key would only be able to poll faction data, the limit could be increased to 500 or 1000?

    Last edited by lonerider543 on 14:54:38 - 18/09/24 (2 months ago)
    • CurlyBracket [2766476]
    • Role: Civilian
    • Level: 82
    • Posts: 879
    • Karma: 876
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:01:56 - 18/09/24 (2 months ago)
    Post link copied to clipboard Copy post link

    This seems like a great idea.  As to the limit, you could make it slightly higher than 100, or maybe even allow factions a handful (5?) of individual keys, each capped at 100, so if necessary, they could be allocated to different apps and one hitting the limit wouldn't break the others - or pooled for a single app like current faction member keys are.

    • Fogest [2254826]
    • Role: Civilian
    • Level: 99
    • Posts: 488
    • Karma: 739
    • Last Action: 4 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:16:51 - 20/09/24 (2 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    I think it's a good idea, but it's not entirely up to me.

    The question is how would these keys be managed, but I'm guessing it would be a new section here (either in "Control" or "Faction Modification"), called "API Keys"?
    c533a771-e6da-4640-8cab-4e5777184429-2088243.png

    And I'm guessing these keys would only have access to non-public faction selections?

     

    Honestly it would be nice to be able to register our applications with Torn for public access. And then for faction specific things have keys like is being suggested here. It would be nice to be able to pull certain public data without it even being tied to one specific persons key. Maybe with it's own usage tracking. So that it isn't tied to your own accounts 100 calls per minute. 

     

    I hate having to ask for peoples keys to pool just to do public API level things. 

    nuke

    • pobk [3171827]
    • Role: Civilian
    • Level: 52
    • Posts: 110
    • Karma: 156
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:05:13 - 22/09/24 (2 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    I think it's a good idea, but it's not entirely up to me.

    The question is how would these keys be managed, but I'm guessing it would be a new section here (either in "Control" or "Faction Modification"), called "API Keys"?
    c533a771-e6da-4640-8cab-4e5777184429-2088243.png

    And I'm guessing these keys would only have access to non-public faction selections?

     

    Fogest [2254826]

    Honestly it would be nice to be able to register our applications with Torn for public access. And then for faction specific things have keys like is being suggested here. It would be nice to be able to pull certain public data without it even being tied to one specific persons key. Maybe with it's own usage tracking. So that it isn't tied to your own accounts 100 calls per minute. 

     

    I hate having to ask for peoples keys to pool just to do public API level things. 

    Hold on a second now... You don't want to be talking about things like OAUTH2 round here... Someone might blow an aneurism or something.

    ~ P

    Support my suggestions: Faction API Keys

    • pobk [3171827]
    • Role: Civilian
    • Level: 52
    • Posts: 110
    • Karma: 156
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:08:20 - 22/09/24 (2 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    I think it's a good idea, but it's not entirely up to me.

    The question is how would these keys be managed, but I'm guessing it would be a new section here (either in "Control" or "Faction Modification"), called "API Keys"?
    c533a771-e6da-4640-8cab-4e5777184429-2088243.png

    And I'm guessing these keys would only have access to non-public faction selections?

     

    Honestly, I have no idea how to even begin to describe how it might work, where it might go or what the logistics would be.

     

    A faction key though, would only have access to the private faction data if that's the role of the key?

    ~ P

    Support my suggestions: Faction API Keys

    • Fruity [2259700]
    • Role: Civilian
    • Level: 89
    • Posts: 85
    • Karma: 23
    • Last Action: 3 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 11:57:03 - 07/10/24 (2 months ago)
    Post link copied to clipboard Copy post link

    +1 here. Lots of boilerplate just to check if the users key is valid, then if the user is in the faction and if the user has faction api permissions and to accurately handle error responses

    InQ

    • pobk [3171827]
    • Role: Civilian
    • Level: 52
    • Posts: 110
    • Karma: 156
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:12:34 - 25/10/24 (1 month ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    I think it's a good idea, but it's not entirely up to me.

    The question is how would these keys be managed, but I'm guessing it would be a new section here (either in "Control" or "Faction Modification"), called "API Keys"?
    c533a771-e6da-4640-8cab-4e5777184429-2088243.png

    And I'm guessing these keys would only have access to non-public faction selections?

     

    Should I open this up as a suggestion somewhere else so that we can get some more traction on this and perhaps, some more eyes... Or have you been pointing Ched in the direction of this forum and your suggestions thread?

     

    The general consensus so far is that this would be a Good Thing[tm].

    ~ P

    Support my suggestions: Faction API Keys

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 736
    • Karma: 2,032
    • Last Action: 4 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:25:36 - 25/10/24 (1 month ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    I think it's a good idea, but it's not entirely up to me.

    The question is how would these keys be managed, but I'm guessing it would be a new section here (either in "Control" or "Faction Modification"), called "API Keys"?
    c533a771-e6da-4640-8cab-4e5777184429-2088243.png

    And I'm guessing these keys would only have access to non-public faction selections?

     

    pobk [3171827]

    Should I open this up as a suggestion somewhere else so that we can get some more traction on this and perhaps, some more eyes... Or have you been pointing Ched in the direction of this forum and your suggestions thread?

     

    The general consensus so far is that this would be a Good Thing[tm].

    We did talk about it a little bit. The biggest concern is if this is worth the development time as substantial modifications to the existing system are needed (both FE and BE), and the question is how many would benefit from this.

     

    I think it might be a good idea to create a thread in the suggestions forum and see how much traction this gets.

     

    I know this is probably not the answer you were looking for, but hopefully it helps a little. 

    • Stig [2648238]
    • Role: Reporter
    • Level: 100
    • Posts: 1,035
    • Karma: 2,476
    • Last Action: 2 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 06:57:55 - 29/10/24 (1 month ago)
    Post link copied to clipboard Copy post link

    I think this is a good idea too, I think it would be important that these keys have properties like:

    - Can access public data about the faction the key belongs to (eg faction basic) would work for no ID input or the ID of Faction that owns the key.

     

    - Less cached data - It would be nice for things like the revives or attacks selections to be cached less often (ie less than 30 seconds)

     

    - Lower API request limit per minute - To make up for the shorter cache the number of requests per minute could be less, such 25 or 50.

     

    As someone who only allows for 1 Faction Key to be linked at a time in my bots, I think this would be a huge benefit to all those factions with rotational leaders, meaning they do not need to constantly swap the keys in the bot config to keep it working if they move faction or leadership position.

    • pobk [3171827]
    • Role: Civilian
    • Level: 52
    • Posts: 110
    • Karma: 156
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:18:47 - 01/11/24 (1 month ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    We did talk about it a little bit. The biggest concern is if this is worth the development time as substantial modifications to the existing system are needed (both FE and BE), and the question is how many would benefit from this.

     

    I think it might be a good idea to create a thread in the suggestions forum and see how much traction this gets.

     

    I know this is probably not the answer you were looking for, but hopefully it helps a little. 

    Have created a thread here:

     

    https://www.torn.com/forums.php#/p=threads&f=4&t=16429732&b=0&a=0

    Last edited by pobk on 15:18:59 - 01/11/24 (1 month ago)

    ~ P

    Support my suggestions: Faction API Keys

    • Fogest [2254826]
    • Role: Civilian
    • Level: 99
    • Posts: 488
    • Karma: 739
    • Last Action: 4 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:53:03 - 06/11/24 (1 month ago)
    Post link copied to clipboard Copy post link

    Stig [2648238]

    I think this is a good idea too, I think it would be important that these keys have properties like:

    - Can access public data about the faction the key belongs to (eg faction basic) would work for no ID input or the ID of Faction that owns the key.

     

    - Less cached data - It would be nice for things like the revives or attacks selections to be cached less often (ie less than 30 seconds)

     

    - Lower API request limit per minute - To make up for the shorter cache the number of requests per minute could be less, such 25 or 50.

     

    As someone who only allows for 1 Faction Key to be linked at a time in my bots, I think this would be a huge benefit to all those factions with rotational leaders, meaning they do not need to constantly swap the keys in the bot config to keep it working if they move faction or leadership position.

    I don't think a lower limit per minute would be good unless that is tied specifically to a faction API limit that is separate from a player limit. I know sometimes just during a chain or event when attacking a lot, you can blow through that limit rather quickly just from regular browser extension style tools. 

     

    I would really love to see the cache on attacks/revives dropped. While running a revive service, a double revive is very common as a person can request a revive, get revived, get killed, and then get revived again because a system is unable to tell they already just received a revive. 

    nuke

    • Stig [2648238]
    • Role: Reporter
    • Level: 100
    • Posts: 1,035
    • Karma: 2,476
    • Last Action: 2 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:12:13 - 06/11/24 (1 month ago)
    Post link copied to clipboard Copy post link

    Stig [2648238]

    I think this is a good idea too, I think it would be important that these keys have properties like:

    - Can access public data about the faction the key belongs to (eg faction basic) would work for no ID input or the ID of Faction that owns the key.

     

    - Less cached data - It would be nice for things like the revives or attacks selections to be cached less often (ie less than 30 seconds)

     

    - Lower API request limit per minute - To make up for the shorter cache the number of requests per minute could be less, such 25 or 50.

     

    As someone who only allows for 1 Faction Key to be linked at a time in my bots, I think this would be a huge benefit to all those factions with rotational leaders, meaning they do not need to constantly swap the keys in the bot config to keep it working if they move faction or leadership position.

    Fogest [2254826]

    I don't think a lower limit per minute would be good unless that is tied specifically to a faction API limit that is separate from a player limit. I know sometimes just during a chain or event when attacking a lot, you can blow through that limit rather quickly just from regular browser extension style tools. 

     

    I would really love to see the cache on attacks/revives dropped. While running a revive service, a double revive is very common as a person can request a revive, get revived, get killed, and then get revived again because a system is unable to tell they already just received a revive. 

    Yes that is what I meant. The lesser limit would only be for the faction key. 

    • tiksan [2383326]
    • Role: Civilian
    • Level: 100
    • Posts: 947
    • Karma: 1,257
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:06:11 - 06/11/24 (1 month ago)
    Post link copied to clipboard Copy post link

    Stig [2648238]

    I think this is a good idea too, I think it would be important that these keys have properties like:

    - Can access public data about the faction the key belongs to (eg faction basic) would work for no ID input or the ID of Faction that owns the key.

     

    - Less cached data - It would be nice for things like the revives or attacks selections to be cached less often (ie less than 30 seconds)

     

    - Lower API request limit per minute - To make up for the shorter cache the number of requests per minute could be less, such 25 or 50.

     

    As someone who only allows for 1 Faction Key to be linked at a time in my bots, I think this would be a huge benefit to all those factions with rotational leaders, meaning they do not need to constantly swap the keys in the bot config to keep it working if they move faction or leadership position.

    Fogest [2254826]

    I don't think a lower limit per minute would be good unless that is tied specifically to a faction API limit that is separate from a player limit. I know sometimes just during a chain or event when attacking a lot, you can blow through that limit rather quickly just from regular browser extension style tools. 

     

    I would really love to see the cache on attacks/revives dropped. While running a revive service, a double revive is very common as a person can request a revive, get revived, get killed, and then get revived again because a system is unable to tell they already just received a revive. 

    You can change the to/from keys and get updated/non-cached data though?

    LnNwLrL.gif

Reply
Thread Title: