[Suggestion] Ability to capture an event when an API key is deleted. — Guild Wars 2 Forums

[Suggestion] Ability to capture an event when an API key is deleted.

Basically an event or via a web hook, to subscribe to a API key delete. (or more kinds of event, if any)

Is this a possible feature?

Comments

  • looking for something like am event that we can subscribe to when an API key is deleted/invalidated.

  • Nokomis.5076Nokomis.5076 Member ✭✭✭

    Via https://wiki.guildwars2.com/wiki/API:2/tokeninfo you could just check, if the API key is still valid.

    Was I able to help you or give you a hint? Click on Helpful and/or Thumbs up, I would appreciate it alot!
    When you encounter a bug ingame, at first you should file a ticket via the ingame command /bug, as only this way the devs will know exactly where you were, when the bug happened.

  • I do understand there is an end point, but I was thinking more in the line of a realtime event that one can subscribe to, when an API key gets deleted.

  • Any particular reason why you need an event for when an API key becomes invalid?
    Curious as to what you would need that kind of time accuracy for

  • Basically to avoid too many /tokeninfo API calls, so that I can rely on a single event for token consistency.

  • You will be able to tell if an API Key is valid or not, with every request you make. The API will tell you then, that your API Key is invald.
    An API should not push information to the client. There is no reason to get the validity of an API key in realtime. It can always be checked when requests are made.

  • Agreed, thats just one way to go about it, thats one extra hop from my API, i would cache the other data, but when it comes to auth its not the same, caching auth/api key and assuming its valid isnt an option either, and checking for tokeninfo on every request on my API end, is too much of an overhead since Ive to always talk to GW2. Hope i was clear.

  • @peekaay.3471 said:
    Agreed, thats just one way to go about it, thats one extra hop from my API, i would cache the other data, but when it comes to auth its not the same, caching auth/api key and assuming its valid isnt an option either, and checking for tokeninfo on every request on my API end, is too much of an overhead since Ive to always talk to GW2. Hope i was clear.

    You don't have to call tokeninfo
    Take this for example https://api.guildwars2.com/v2/account?access_token=8A0F6DC1-6034-BF48-99FA-ABDF541F13401931E4F6-F174-433A-8563-EDC29561AA92
    It directly tells you the key is invalid, no need to call tokeninfo

©2010–2018 ArenaNet, LLC. All rights reserved. Guild Wars, Guild Wars 2, Heart of Thorns, Guild Wars 2: Path of Fire, ArenaNet, NCSOFT, the Interlocking NC Logo, and all associated logos and designs are trademarks or registered trademarks of NCSOFT Corporation. All other trademarks are the property of their respective owners.