cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Access token invalid after upgrading to API v2

Access token invalid after upgrading to API v2

Mark R.43
New member | Level 2

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 5

Greg-DB
Dropbox Staff

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.43
New 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.43
New 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-DB
Dropbox Staff

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-DB
Dropbox Staff
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
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Mark R.43 New member | Level 2
What do Dropbox user levels mean?