We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
cjh39
8 years agoExplorer | Level 3
No access -App folder deleted (Pending)
I have added an App access request using the link from the app and accepted it. I gave the access code to the app. In my account I see the "connected" app, but it says "No access - App folder del...
Greg-DB
Dropbox Community Moderator
8 years agoThanks for the additional information! I see from the 'response_type=code' that you're using the "code" flow, which means that the string you get back is an "authorization code", not an "access token". You need ot exchange the authorization code for an access token using /oauth2/token. (Alternatively, depending on your scenario, you may be able to switch to the "token" flow.)
You can find more information in the OAuth guide and authorization documentation.
cjh39
8 years agoExplorer | Level 3
I have ran exactly the following:
1. https://www.dropbox.com/oauth2/authorize/?client_id=6yd84s2nlfufy5t&response_type=code
The code is : <redacted>
2. The App device calls with the grant_type set to the above code.
curl -X POST https://api.dropboxapi.com/oauth2/token --data "{\"client_id\": \"6yd84s2nlfufy5t\",\"grant_type\": \"<redacted>\",\"client_secret\": \"<redacted>\"}"
and gets ::
{"error_description": "No auth function available for given request", "error": "invalid_request"}
What do I need to change ?
- Greg-DB8 years ago
Dropbox Community Moderator
This is an OAuth endpoint, so it works a bit differently than the Dropbox API RPC, etc., endpoints. Here's an example of what that /oauth2/token call should look like:
curl https://api.dropbox.com/1/oauth2/token \ -d code=<authorization code> \ -d grant_type=authorization_code \ -u <app key>:<app secret>Fill in your values in the <...> placeholders.
- cjh39drop8 years agoNew member | Level 2
I followed these steps including your last one
1. https://www.dropbox.com/oauth2/authorize/?client_id=6yd84s2nlfufy5t&response_type=code
Got the code from Accepting the App on the users account
2. curl https://api.dropbox.com/1/oauth2/token -d code=<redacted> -d grant_type=<redacted> -u 6yd84s2nlfufy5t:<redacted>
{"error_description": "\"grant_type\": got \"<redacted>\", expecting \"authorization_code\"", "error": "invalid_request"}
What do I need to change ?
- Greg-DB8 years ago
Dropbox Community Moderator
The "grant_type" parameter value should be the actual string "authorization_code", not the code itself. You put your code there again instead of the string "authorization_code". You should only supply the code itself once, as the "code" parameter value.
In the example in my previous comment, make sure you only replace the parts with the <...> placeholders.
That means it should look like this:
curl https://api.dropbox.com/1/oauth2/token \ -d code=Aa9Bb8Cc7Dd6Ee5Ff4Gg3 \ -d grant_type=authorization_code \ -u a1b2bc3:d4e5f6
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!