Learn how to make the most out of the Dropbox Community here 💙!
Forum Discussion
amitjoshi1514
5 years agoExplorer | Level 4
Error in call to API function "file_requests/create"
Soooo.... this has been driving me nuts for the past day or two. I am sure I am missing something obvious, but I have no other paths forward. So here goes. I have created an app. And I am trying to c...
- 5 years ago
The /2/file_requests/create endpoint is an "RPC" style endpoint, meaning that it takes takes its parameters as JSON sent in the request body.
Looking at your code, I see you seem to be sending your JSON parameters in a header (named 'data'), not in the request body. You'll need to move that to the request body, via whatever mechanism your HTTP client offers. For curl in PHP, you'll likely want to use the 'CURLOPT_POSTFIELDS' option.
Also, note that the content type header name should be "Content-Type", not "Content_Type".
Greg-DB
Dropbox Staff
5 years agoThe /2/file_requests/create endpoint is an "RPC" style endpoint, meaning that it takes takes its parameters as JSON sent in the request body.
Looking at your code, I see you seem to be sending your JSON parameters in a header (named 'data'), not in the request body. You'll need to move that to the request body, via whatever mechanism your HTTP client offers. For curl in PHP, you'll likely want to use the 'CURLOPT_POSTFIELDS' option.
Also, note that the content type header name should be "Content-Type", not "Content_Type".
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,972 PostsLatest Activity: 2 days 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!