peekaay.3471 Posted August 20, 2018 Share Posted August 20, 2018 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? Link to comment Share on other sites More sharing options...
peekaay.3471 Posted August 20, 2018 Author Share Posted August 20, 2018 looking for something like am event that we can subscribe to when an API key is deleted/invalidated. Link to comment Share on other sites More sharing options...
Nokomis.5076 Posted August 20, 2018 Share Posted August 20, 2018 Via https://wiki.guildwars2.com/wiki/API:2/tokeninfo you could just check, if the API key is still valid. Link to comment Share on other sites More sharing options...
peekaay.3471 Posted August 22, 2018 Author Share Posted August 22, 2018 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. Link to comment Share on other sites More sharing options...
I Am Dansker.7105 Posted August 22, 2018 Share Posted August 22, 2018 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 Link to comment Share on other sites More sharing options...
peekaay.3471 Posted August 28, 2018 Author Share Posted August 28, 2018 Basically to avoid too many /tokeninfo API calls, so that I can rely on a single event for token consistency. Link to comment Share on other sites More sharing options...
WeAreTwO.9780 Posted August 29, 2018 Share Posted August 29, 2018 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. Link to comment Share on other sites More sharing options...
peekaay.3471 Posted September 1, 2018 Author Share Posted September 1, 2018 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. Link to comment Share on other sites More sharing options...
I Am Dansker.7105 Posted September 4, 2018 Share Posted September 4, 2018 > @"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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now