Skip to main content

Hello ,


do we have a sample to get the refresh token in Python Gen SDK ?


and those any rule to using refresh token ? like i am a Dev account can we using the refresh token ?


and where can get the authorization code ?


if Enterprise account do we need refresh token ?


Many thanks !

Hi @user159 ,



In our Python Next Gen workshop there are examples for all authentication options.



Take a look at:







Developer tokens cannot be refreshed using the API, you have to manuallt refresh them in the application console.



Let us know if this helps.


that mean refresh token not for dev token ? if so what situation we need refresh token or what the refresh token working for ? really confuse me , thanks !


Hi Paul,



The refresh token is only used for the OAuth 2.0 authentication.



When using OAuth 2.0, you get an access token valid for 60 minutes, and a refresh token valid for 60 days. When the access token is expired, you use the refresh token to get both a new access token and refresh token, again valid for another 60 minutes and 60 days respectively.



Developer tokens can not be refreshed programatically. They have to be manually generated using the developer console. These are also valid for 60 minutes



Both Client Credential Grant (CCG) and JSON Web Token (JWT) also don’t have a refresh token. Your application uses the credentials to get an access token also valid for 60 minutes, and once it expires, use the credentials again to get a new one.



Let us know if this helps.



Cheers


Reply