Hello! I created an application in python, but every day the access token is updated and the error Unable to refresh access token without refresh token and app key appears. How to make a long-term access token?
almazultra wrote: I created an application in python, but every day the access token is updated and the error Unable to refresh access token without refresh token and app key appears. How to make a long-term access token?
I created an application in python, but every day the access token is updated and the error Unable to refresh access token without refresh token and app key appears. How to make a long-term access token?
Long-lived (or permanent) tokens were deprecated back in 2021 and can no longer be created. You now use refresh tokens to retrieve new short-lived tokens as needed. See here for more information:
Hi @almazultra,
As @Rich mentioned, the option for long-lived or long-term access token is no longer available.
Apps can get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. Refresh tokens do not expire automatically and can be used repeatedly. You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.
When using the Python SDK, there is no need to implement all of this logic yourself. You can find OAuth flow examples specific to the Python SDK here.
If you continue encountering errors, please reply with: