#yo-apps-oauth
1 messages · Page 1 of 1 (latest)
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.
- yo-stripe-apps, 1 day ago, 20 messages
- yo_123_123, 4 days ago, 22 messages
- yo_123_123-access-refresh-tokens, 4 days ago, 15 messages
yo-apps-oauth
Hi 👋
Hi
You are right, you need to request a new access token. We explain that bit here
Access tokens expire in 1 hour
We describe the flow here: https://stripe.com/docs/stripe-apps/api-authentication/oauth#refresh-access-token
So you can store the access_token for up to 1 hour if it reduces the number of API calls your app makes
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?
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
ok I will try that logic in my app. Thank you, will come back if it don't work. thanks for your help.