You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
raRaRa
4 years agoHelpful | Level 6
Issue with temporary link, related to refresh tokens?
Hi all.
I noticed this error when opening a temporary link that my app has recently created (under 1 hour), with the status code 410 (Gone).
{"error": "Unauthorized"}
However, I usually get "Not Found" error message when a temporary link has expired, but the newly created temporary link above shows the Unauthorized error when opening it.
{"error": "Not Found"}
I'm now wondering if this is related to refreshing access tokens, causing all previous temporary links to expire automatically. If that's the case, then I'd need to re-create hundreds of temporary links every time the access token is refreshed, which is not very friendly experience.
I hadn't noticed this issue until recently when I migrated to refreshing access tokens.
raRaRa First, for reference, note that performing a refresh does not itself invalidate any previous short-lived access tokens for that refresh token, or any temporary links created using those previous short-lived access tokens. However, due to how temporary links are implemented, they are reliant on the validity of the access token used to create them. That means that once a particular short-lived access token expires (or is revoked), any temporary links created by that access token will also become invalid (even if they have not yet expired themselves).
So, in your case, you may want to proactively create a new short-lived access token when you need to create a new temporary link, so you can get about the full four hours on the temporary link. (Creating a new short-lived access token does not invalidate previous ones.)
mhaind It sounds like you may be experiencing a different issue. This thread is referring to a problem using "temporary links" with the Dropbox API, but it sounds like you're running in to an issue using "shared links" with the Dropbox product itself. You should contact support for help with that.
- Greg-DBDropbox Staff
raRaRa First, for reference, note that performing a refresh does not itself invalidate any previous short-lived access tokens for that refresh token, or any temporary links created using those previous short-lived access tokens. However, due to how temporary links are implemented, they are reliant on the validity of the access token used to create them. That means that once a particular short-lived access token expires (or is revoked), any temporary links created by that access token will also become invalid (even if they have not yet expired themselves).
So, in your case, you may want to proactively create a new short-lived access token when you need to create a new temporary link, so you can get about the full four hours on the temporary link. (Creating a new short-lived access token does not invalidate previous ones.)
mhaind It sounds like you may be experiencing a different issue. This thread is referring to a problem using "temporary links" with the Dropbox API, but it sounds like you're running in to an issue using "shared links" with the Dropbox product itself. You should contact support for help with that.
- raRaRaHelpful | Level 6
Greg-DB Thank you so much for the clarification, that makes sense. Like you explained, I think the best solution for me is to create a new short lived access token every time before I create new temporary links, just to make sure that the full 4 hours are utilized.
Thank you again!
- mhaindNew member | Level 2
I'm also facing the same issue after I migrated from the Individual / PersonalPlus plan to the Business /Work Advanced plan.
All the previously created share links are not working and also unable to create any new links or invite team members.
- raRaRaHelpful | Level 6
Here's an example temporary link to a video that has the Unauthorized error:
The only thing that changed was that the access token was refreshed and a new temporary link was created since the old link was about to expire.
Here's the old temporary link to the video file:And it currently has the error "The link has expired", which is expected:
{"error": "The link has expired."}
When the unauthorized link actually expires, the unauthorized error will change to the link has expired error.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 6 years agoIf 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!