We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
saurabh6790
8 years agoExplorer | Level 3
How to get OAuth2 access token from OAuth1 token and secret with API v2
hi,
While creating an OAuth2 access token from OAuth1, I am getting error saying
Error in call to API function "auth/token/from_oauth1": Invalid value in HTTP header "Authorization": "Be...
- 8 years ago
Apologies for the confusion. The curl example in the documentation and API Explorer for /2/auth/token/from_oauth1 are unfortunately incorrect. I'll let the team know to fix that.
That endpoint actually uses app authentication ( https://www.dropbox.com/developers/reference/auth-types#app ), so a bearer access token isn't necessary. This is what the curl example should look like:curl -X POST https://api.dropboxapi.com/2/auth/token/from_oauth1 \ -u "APP_KEY:APP_SECRET" \ --header "Content-Type: application/json" \ --data "{\"oauth1_token\": \"OAUTH1_TOKEN_KEY\",\"oauth1_token_secret\": \"OAUTH1_TOKEN_SECRET\"}"
rishutiwari
Explorer | Level 3
ok thanks,
Could you help me with this endpoint :
curl https://api.dropbox.com/oauth2/token \ -d code=<AUTHORIZATION_CODE> \ -d grant_type=authorization_code \ -d redirect_uri=<REDIRECT_URI> \ -u <APP_KEY>:<APP_SECRET>
what we given in the <Authorization code>
and what we keep in the grant_type.because i couldn't find out what those parameter to be set and got the proper response.
rishutiwari
4 years agoExplorer | Level 3
I resolved it..Thanks
- l0k14 years agoNew member | Level 2Hi rishutiwari, Glad to hear about U resolved it. Could you please tell me how to deal with the 4XX error while using new end point "https://api.dropboxapi.com/oauth2/token". That would be really helpful. Thank you.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 2 years agoIf 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!