Access token is getting expired in 60 min

(Naman Verma) #1

I am implementing dwolla in ruby on rails.Access token is getting expired in 60 min.Is there is any method to make the token dynamic.If possible please share the code to implement it.


(Spencer Hunter) #2

@naman_verma, Dwolla’s implementation of OAuth2 uses short-lived access tokens with a TTL of 1 hour. You’ll likely want to maintain access for longer than 1 hour, which means you’ll want to implement a way to refresh authorization. If you’re integrating with our Access API then you’ll initially obtain an application access token from the API. It is then recommended to put this access token in some type of shared storage and periodically refresh (every 45min-1 hour). As mentioned in the README for dwolla-v2-ruby, “Application tokens do not include a refresh_token. When an application token expires, generate a new one using $dwolla.auths.client.”