#yo-apps-oauth

1 messages · Page 1 of 1 (latest)

sullen siloBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

lofty star
#

yo-apps-oauth

low quail
#

Hi 👋

north rover
#

Hi

low quail
#

You are right, you need to request a new access token. We explain that bit here

Access tokens expire in 1 hour

#

So you can store the access_token for up to 1 hour if it reduces the number of API calls your app makes

north rover
#

yes I have done the whole flow

curl -X POST https://api.stripe.com/v1/oauth/token
-u sk_omit_:
-d refresh_token=rt_

-d grant_type=refresh_token

I guess what I am asking is I have requested 1 hour refresh token, then requested 1 year token, stored the 1 year refresh token.

If I want to get a new 1 hour access token do I call the same /token route and does it reset my refresh token again, so I have to update that in my database?

low quail
#

If I want to get a new 1 hour access token do I call the same /token route and does it reset my refresh token again, so I have to update that in my database

That is my read of this sentence in the doc

Refresh tokens are also rolled on every exchange, so the expiry time for the new refresh tokens are always a year from the date that it was generated or rolled

north rover
#

ok I will try that logic in my app. Thank you, will come back if it don't work. thanks for your help.