We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
DeathApocalypse
8 years agoExplorer | Level 3
Error in call to API function "files/delete_v2": request body: could not decode input as JSON
hi, i'm trying to delete a file inside an app folder using HTTP POST request in UNITY,
i'm having no problem to delete file through the Dropbox API explorer,
but in UNITY receiving an error:
"Error in call to API function "files/delete_v2": request body: could not decode input as JSON"
here is the request form:
URL: https://api.dropboxapi.com/2/files/delete_v2
headers:
'Authorization: Bearer my_super_secret_token'
'Content-Type: application/json'
'data: {"path":"/DEV_TEST1.mp4"}'
what am i doing wrong?
2 Replies
- chirstius8 years ago
Dropbox Staff
hey DeathApocalypse,
Are you possibly including the data as an HTTP header? The JSON payload needs to be the actual body/data content of the POST request, not included in the headers.
-Chuck
- DeathApocalypse8 years agoExplorer | Level 3
fixed it, now it works. thanks for the quick response!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 12 hours ago
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 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!