How to save and refresh access token

(Leaf Ye) #1

dwolla_key = secret.dwolla_key
dwolla_secret = secret.dwolla_secret
client = dwollav2.Client(key = dwolla_key,
secret = dwolla_secret,
environment = ‘sandbox’)
app_token = client.Auth.client() # this is the access token, but don’t know how i will save this

just want to know how i will save the access token to database and refresh every hour, can you give a sample code for this. Also how will i be get the refresh token that is expired 60 days.

About the application:
Using Flask python
Using dwollav2