cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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: 

Obtaining authorization token with code flow

Highlighted

Obtaining authorization token with code flow

Explorer | Level 4

I'm trying to obtain authorization token with code flow. I'm using spatie/flysystem-dropbox in laravel. I'm redirected to my site, with code parameter in url, but i can't get my token.Zrzut ekranu 2020-08-21 o 11.41.21.png

 

I recieve this error: 

{"error_description":"No auth function available for given request","error":"invalid_request"}

 

3 Replies 3
Highlighted

Re: Obtaining authorization token with code flow

Dropboxer

The "No auth function available for given request" error should indicate that the excepted parameters for this call were not supplied correctly in the HTTPS request to /oauth2/token.

 

It looks like you're providing the necessary variables, but they may not be getting sent in the right way. How is the array in that second parameter to Http::post getting formatted and sent? The parameters for /oauth2/token should be sent as application/x-www-form-urlencoded POST parameters. 

 

Are you able to print out the raw HTTP request? That may be useful for debugging this. We can't provide support for third party clients, platforms, or libraries though, such as spatie/flysystem-dropbox or Laravel, so I can't offer guidance on exactly how you'd do so. You may need to refer to the relevant documentation for that.

Highlighted

Re: Obtaining authorization token with code flow

Super Collaborator | Level 20

Hi @sbartan,

Have you read "Request Data" documentation carefully? Make note on:

By default, data will be sent using the application/json content type

Little bit below could be seen:

If you would like to send data using the application/x-www-form-urlencoded content type, you should call the asForm method before making your request

Hope this helps. 😉

Highlighted

Re: Obtaining authorization token with code flow

Explorer | Level 4

Thanks @Здравко, it's working now!

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?