Learn how to make the most out of the Dropbox Community here 💙.
Learn how to make the most out of the Dropbox Community here 💙.
When I refresh the access_token, the length of the new access_token is sometimes 1459 characters, sometimes 151 characters.
Why is that, and should I care?
OAuth access tokens are an encoded string all of the necessary access information. This information varies from information about the user's identity, their permissions or scopes, the issuing application, expiration time, etc. The length variance could be, in part, due to time (such as expiration, time of issuance, etc.) being encoded into this string.
Hope you find this information helpful!
Hi GustavBrock,
The Dropbox API access token length can vary due to various factors on the Dropbox servers. Please note that per the documentation:
access_token String The access token to be used to call the Dropbox API. This should always be treated as opaque with no guarantees as to the size or composition of this token.
That said, focusing on the length of an "access_token" should not be a priority, as long as it is being securely handled and stored.
Thanks. Yes, I'm aware of that, and I had read the documentation.
It is not the actual length of the tokens, but the fact that they for the exact same call within a minute may switch - about ten long tokens for one short - that caught my attention during test. At production, I will only refresh when needed.
As a developer, I just wonder about the rationale behind this; my own applications would publish only one type of token for a given type of call.
So, no priority, only curiosity.
OAuth access tokens are an encoded string all of the necessary access information. This information varies from information about the user's identity, their permissions or scopes, the issuing application, expiration time, etc. The length variance could be, in part, due to time (such as expiration, time of issuance, etc.) being encoded into this string.
Hope you find this information helpful!
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!