cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"No auth function available for given request" return on /token request

"No auth function available for given request" return on /token request

jenseno
Explorer | Level 4

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 auth function available for given request".

My request form data looks like this:

 

Header:

POST /oauth2/token HTTP/1.1
Host: api.dropboxapi.com
User-Agent: UnityPlayer/5.5.2f1 (UnityWebRequest/1.0, libcurl/7.46.0-DEV)
Accept: */*
Accept-Encoding: identity
X-Unity-Version: 5.5.2f1
Content-Length: 177

 

Post data:

code=KNJIALLS_WCAAAAAAABSTZP97AYWIZJPX9B1A6CBFUC&grant_type=authorization_code&client_id=<removed for security>&client_secret=<removed for security>&redirect_uri=http%3A%2F%2F127.0.0.1%3A6756

 

I could not find anything on google or the forums, so now I'm trying here.

I can see that auth authorization is missing (Authorization bearer) but the docs said nothing about this, and I don't have a token at this stage in the process anyway.

 

Thanks in advance

 

Odin Jensen

 

 

 

22 Replies 22

Greg-DB
Dropbox Staff
I don't see anything clearly wrong with your request. To help troubleshoot this, can you share the full/raw request and response? (Just be sure to redact your app secret.)

Also, this blog post may be helpful:

https://blogs.dropbox.com/developers/2013/07/using-oauth-2-0-with-the-core-api/

jenseno
Explorer | Level 4

Thanks. The raw request (from Fiddler) is as follows:

 

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
X-Unity-Version: 5.6.0f3
Content-Length: 177

code=KNJIALLS_WCAAAAAAABS-QAPRCDPDJ7TLVWLT2JGUFU&grant_type=authorization_code&client_id=<censored>&client_secret=<censored>&redirect_uri=http%3A%2F%2F127.0.0.1%3A6756

Greg-DB
Dropbox Staff
I suspect the issue is that you're missing the "Content-Type" header. It should be "Content-Type: application/x-www-form-urlencoded". Try that and let me know if it doesn't help.

jenseno
Explorer | Level 4
Setting that content type returns a 500 with message internal server error?

Greg-DB
Dropbox Staff
Can you include the full request and response for that? Please do include the response headers so we can look into it.

jenseno
Explorer | 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 Staff
Thanks! 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.

jenseno
Explorer | Level 4
Still get 500. X-Dropbox-Request-Id: 04f52af12d3fa4ab1f040ec979addd8b

Greg-DB
Dropbox Staff
Thanks for letting me know. We'll look into it.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Laurent22 Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    jenseno Explorer | Level 4
  • User avatar
    bruce0205 New member | Level 2
What do Dropbox user levels mean?