Start 2025 on time and up to date! Seamlessly integrate your calendars into Dropbox with these simple steps! 📆
Forum Discussion
almazultra
10 days agoNew member | Level 1
Unable to refresh access token without refresh token and app key
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?
2 Replies
Sort By
- RichSuper User II
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?
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:
- https://www.dropboxforum.com/discussions/101000014/we-need-long-live-access-token/629228/replies/629344#M29066
- DB-DesDropbox Engineer
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:
- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
- the full text of any error or unexpected output
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,931 PostsLatest Activity: 14 hours ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!