Closed kokhans closed 5 years ago
Are you happening to be using the refresh token more than once? Once you use it the first time, it will be revoked. And the new one returned with the new access token should be used instead.
I use it only once
. So after getting new AccessToken
and RefreshToken
I will wait for 24 hours
and after this period I got an error.
We'll need someone to look into your account, if you only used the RefreshToken once, it shouldn't expire so early. Please contact out support team so we can look into your account: https://help.braintreepayments.com/
OAuth - Refresh Token Is Revoked After 24 Hours
Issue description
After creating an access token from code
OAuth.CreateTokenFromCode(request)
we get an object withAccessToken
,RefreshToken
,ExpiresAt
fields successfully. From your docs OAuth (Beta) Access Tokens:accessToken
will expire24 hours
from its creation;refreshToken
is provided when you get the initial access token and will expire180 days
from its creation.If we will wait
24 hours
and will try to useRefreshToken
to get newAccessToken
andRefreshToken
, we will get the next error:Expected result
: We should have the possibility to useRefreshToken
for180 days
to get newAccessToken
andRefreshToken
.