1

I am trying to exchange the authorization code I received without success. I am using the manual way where I omit the redirect url:

https://api.dropbox.com/oauth2/authorize?response_type=code&client_id=<key>scope=&state=<state>

when this url is activated it will take the user to the authorization screen, if the user authorized the app, it DOES NOT redirect, instead it prints an authorization code such as:

Enter this code into <app-name> to finish the process.

GooKWtwe54AAAAAAABABSUl_Ruv1COvpBBCuWQ5kv2g

How do I exchange this code for an access token?

1

1 Answer 1

2

If you're not supplying a redirect_uri parameter on /oauth2/authorize to automatically redirect the user, you can prompt them to copy that authorization code into your app manually. Then, your app should exchange that authorization code for an access token using /oauth2/token.

Also, note that /oauth2/authorize should be accessed on www.dropbox.com not api.dropboxapi.com, as it is a web page. The /oauth2/token endpoint is an API call, so that should called on api.dropboxapi.com.

You can find the documentation for both of these here:

https://www.dropbox.com/developers/documentation/http/documentation#authorization

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.