cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Error in call to API function "files/delete_v2": request body: could not decode input as JSON

Error in call to API function "files/delete_v2": request body: could not decode input as JSON

DeathApocalypse
Explorer | Level 3

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 2

chirstius
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

DeathApocalypse
Explorer | Level 3

fixed it, now it works. thanks for the quick response!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    DeathApocalypse Explorer | Level 3
  • User avatar
    chirstius Dropbox Staff
What do Dropbox user levels mean?