We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
jenseno
9 years agoExplorer | Level 4
"No auth function available for given request" return on /token request
Hi. I send the following form data with the code I got from the authorization page. I use redirect_uri back to my app through localhost. However I get the following response (error code 400): "No...
jenseno
9 years agoExplorer | Level 4
Request:
POST https://api.dropboxapi.com/oauth2/token HTTP/1.1
Host: api.dropboxapi.com
User-Agent: UnityPlayer/5.6.0f3 (UnityWebRequest/1.0, libcurl/7.51.0-DEV)
Accept: */*
Accept-Encoding: identity
Content-Type: application/x-www-form-urlencoded
X-Unity-Version: 5.6.0f3
Content-Length: 177
code=KNJIALLS_WCAAAAAAABS_UY40OCMSQQ5VHIKCHVKFDE&grant_type=authorization_code&client_id=<secret>&client_secret=<secret>&redirect_uri=http%3A%2F%2F127.0.0.1%3A6756
Response:
HTTP/1.1 500 Internal Server Error
Server: nginx
Date: Mon, 17 Apr 2017 18:19:51 GMT
Content-Type: text/plain
Content-Length: 21
Connection: keep-alive
X-Dropbox-Request-Id: 064f4c248437db078acf3ca54396051e
Internal server error
Greg-DB
Dropbox Community Moderator
9 years agoThanks! That may have just been a transient issue on our side. Can you try once more now? Please share the X-Dropbox-Request-Id again if you still get a 500.
- jenseno9 years agoExplorer | Level 4Still get 500. X-Dropbox-Request-Id: 04f52af12d3fa4ab1f040ec979addd8b
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks for letting me know. We'll look into it. - jenseno9 years agoExplorer | Level 4
Any chance you'd had the time to look into this? I got everything else working for next release of my app ;)
- Greg-DB9 years ago
Dropbox Community Moderator
This is open with the team, but I don't have an update on it yet. I'll follow up here once I do. - jenseno9 years agoExplorer | Level 4
Any news? I really need this to release next version of my app and dropbox backup is the number one requested feature from my costumers ;)
- Greg-DB9 years ago
Dropbox Community Moderator
This is open with the team, but I don't have an update yet.
Can you check if you're still seeing this though? I don't know what the underlying cause was yet, but it may have just been a transient issue. - jenseno9 years agoExplorer | Level 4
I still get the same error. If you guys have Unity installed, I can send you a sample project that produces the error?
- Greg-DB9 years ago
Dropbox Community Moderator
Sure, that may help us investigate. Thanks! - jenseno9 years agoExplorer | Level 4
Hi. I have the sample code ready. Where can I mail it securely? For your convenience, it contains my app secret keys etc.
Regards
Odin
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks! You don't need to include the app secret, but in any case you can submit it in an API ticket here:
https://www.dropbox.com/developers/contact - jenseno9 years agoExplorer | Level 4
Thanks. Ive submitted instructions as wel as link to download (in my dropbox)
Just mail me if questions :)
Regards
Odin
- bruce02059 years agoNew member | Level 2Hi sir,
I have encountered the same problem.
It bothered me a while.
Is this the problem solved?
Could you tell me how to do?
Thanks in advance!! - jenseno9 years agoExplorer | Level 4
Actually my problem was that I accidentially upper cased the request code, due to copy paste og some other code ;)
So I guess you need to make sure that the code you get from Dropbox API is not modified in any way, before you request the token
Regards
Odin
- Laurent228 years agoExplorer | Level 4
In my case I had this issue because I was using the wrong content type to post the data.
This endpoint is actually very confusing because unlike all the other endpoints (which accept application/json) it accepts application/x-www-form-urlencoded, and if you use the wrong format it will respond with this absurd error message "No auth function" even though there can't be an auth token at that point.In my tests other mistakes in the data format (like missing client ID or secret) also resulted in this error .
From the doc it's unclear whether client ID and secret are required or not (I have no idea what "If credentials are passed in
POSTparameters" means in this context) but they seem to be required anyway.So in my case I eventually got it working using this kind of request:
curl -v -F 'client_id=REMOVED' -F 'client_secret=REMOVED' -F 'code=REMOVED' -F 'grant_type=authorization_code' https://api.dropboxapi.com/oauth2/token
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!