We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
Mark R.43
10 years agoNew member | Level 2
Access token invalid after upgrading to API v2
Hello,
My application has been using the Dropbox API v1 for a while now, and I'm in the process of updating it to support Dropbox API v2.
The issue I'm having is that existing v1 access tokens (which my app stores) are no longer working when communicating with the v2 API. Attempts to use a v1 access token yield a "access token is malformed" response.
The problem goes away if the user re-authorizes, of course. But I'd like to make the upgrade process as seamless as possible for users, so is there an option to silently upgrade their stored API v1 access tokens?
I'm using the .NET Dropbox SDK.
Regards,
Mark R.
5 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
Hi Mark, are your existing access tokens OAuth 1 access tokens, or OAuth 2 access tokens?
OAuth 1 access tokens have two pieces, a key and a secret. OAuth 2 access tokens are just one long string.
API v2 only uses OAuth 2, so if you have OAuth 1 access tokens, you'll need to migrate to OAuth 2 first. You can do so using /oauth2/token_from_oauth1.
If you do have OAuth 2 access tokens already though, those should work between both API v1 and API v2 without issue. In that case, please share a sample request/response of the issue. Just be sure to obscure some of the access token for safety.
- Mark R.4310 years agoNew member | Level 2
Hi Gregory,
Thanks very much for the advice. Indeed, it appears the existing version of my application is using OAuth 1 access tokens (there are "key" and "secret" parts to it).
I'll take a look at the token migration link that you provided.
Appreciate the quick response!
Regards,
Mark R.
- Mark R.4310 years agoNew member | Level 2
Hi Gregory,
A quick follow-up question.
Since "/oauth2/token_from_oauth1" is part of Dropbox API v1, will it be retired in 2017 as well?
Regards,
Mark R.
- Greg-DB10 years ago
Dropbox Community Moderator
That endpoint is part of API v1, so it would be shut down with v1. (Unfortunately it's not trivial to migrate it to API v2, since it by definition uses OAuth 1, which API v2 doesn't support.)
So for now, we recommend using that endpoint and performing the migration before v1 is retired. We'll be keeping an eye on this and offer a solution for doing this via v2 after the fact if necessary though.
- Greg-DB9 years ago
Dropbox Community Moderator
To follow up here, we do now have an API v2 version of this:
https://www.dropbox.com/developers/documentation/http/documentation#auth-token-from_oauth1
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 9 months ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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!