How to check access token expired or not


(Ashwini S) #1

Hi …,

Is there any dwolla API to check access token is expired or not…

Thanks,
Ashwini


(Spencer Hunter) #2

Hi @ashwini_s, Outside of attempting to call the API with your access token to see if it is valid we do not have a endpoint available which checks the the validity of an access token. As an alternative, you could store the expires_in time(returned in the token response) alongside your access token in some type of persistent storage. This would allow you to check the remaining time to live on your issued access token.


(Adam Esterle) #3

Could this be a feature in the future?

It would be much nicer to see an array that returns saying it is expired before going on to call an API and getting an error exception thrown.

Currently, we have to check for the error, check if it’s an access token error, reauth (refresh or Oauth flow), and then call that original api again


(Spencer Hunter) #4

This isn’t something that we’ve taken into consideration, however I’ll be sure to pass along this feedback to the Product team. :slight_smile:


(Adam Esterle) #5

Sweet! Thanks for all of your fast replies by the way!


(Cory Anderson) #6

(Cory Anderson) #7

(Cory Anderson) #8