We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
giullianoa
9 years agoExplorer | Level 4
Migration token OAuth 1 to Oauth 2
Good Afternoon I triyed to update my OAuth 1 token to OAuth 2 through this HTTP request : https://api.dropboxapi.com/2/auth/token/from_oauth1 But the response looks like this : {"error_s...
Greg-DB
Dropbox Community Moderator
9 years agoTo properly call /2/auth/token/from_oauth1, you will need four pieces:
- In the "Authorization" header, as Basic authentication, you need to provide the 1) app key and 2) app secret.
- In the request body, as JSON, you need to provide the 3) oauth1_token, i.e., the OAuth 1 access token key, and 4) oauth1_token_secret, i.e., the OAuth 1 access token secret.
These 4 strings would all be different strings.
Are you sending up all 4 of those?
giullianoa
9 years agoExplorer | Level 4
Thank you for quickly response.
1) Am I need to pass ( appKey: appSecret ) in the Authorization header ?
3) oauth1_token is the appKey ?
4) oauth1_token_secret is the secret ?
My request is made by this way :
- Greg-DB9 years ago
Dropbox Community Moderator
You do need to pass the app key and secret in the Authorization header.
The oauth1_token is not the app key, and the oauth1_token_secret is not the app secret. These all should be different strings.
The oauth1_token is the key portion of the OAuth 1 access token. The oauth1_token_secret is the secret portion of the OAuth 1 access token. You would get these from the stored OAuth 1 access tokens you have for users from when your app was using OAuth 1 on API v1. If your app doesn't have stored OAuth 1 access tokens, you shouldn't be using /2/auth/token/from_oauth1.- giullianoa9 years agoExplorer | Level 4
I have to explain my situation...
I used to use SDK's maded to PHP, but with this nes upgrade with the new update this become obsolete.
What the way i can get to migrate my app ?
I think this https://api.dropboxapi.com/2/auth/token/from_oauth1 is the better way to i can finish the migration.
Can you help me ?
- Greg-DB9 years ago
Dropbox Community Moderator
Are you referring to this PHP SDK?
https://github.com/dropbox/dropbox-sdk-php
That SDK already used OAuth 2, not OAuth 1. If you were using that, you shouldn't have OAuth 1 tokens, so you don't need to use /2/auth/token/from_oauth1. You should just use the existing OAuth 2 access tokens with API v2.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!