Take Your Search Game to the Next Level with Dropbox Dash 🚀✨ Curious how it works? Ask us here!
Forum Discussion
sbartan
5 years agoExplorer | Level 4
Obtaining authorization token with code flow
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.
I recieve this error:
{"error_description":"No auth function available for given request","error":"invalid_request"}
3 Replies
Sort By
- Greg-DB
Dropbox Staff
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.
- ЗдравкоLegendary | 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. 😉
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,997 PostsLatest Activity: 5 hours ago
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 or Facebook.
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!