Learn how to make the most out of the Dropbox Community here 💙. 

Forum Discussion

MateusP's avatar
MateusP
Helpful | Level 6
9 years ago
Solved

How to migrate previous API v1 authentication to APIv2?

Hi All,   So I've successfully migrated my Android app to Dbx API v2 (hooray!) but there's one bit missing.  I need to tranfer previous APIv1 authentication to APIv2 otherwise everyone will be fo...
  • Greg-DB's avatar
    Greg-DB
    9 years ago
    Yes, OAuth 2 access tokens only have one piece. That is, each OAuth 2 access token is just one long string.

    In your API v1 code, you're storing that via the access_token variable under DROPBOX_PREFS_SECRET.

    In your API v2 code, you're storing that via the access_token variable under DROPBOX_PREFS_TOKEN.

    (Part of the confusion may be that API v1 supported both OAuth 1 and OAuth 2. OAuth 1 access tokens are comprised of two pieces, a key and secret. API v2 only supports OAuth 2. OAuth 2 access tokens only have the one piece.)