Start 2025 on time and up to date! Seamlessly integrate your calendars into Dropbox with these simple steps! 📆

Forum Discussion

thaha's avatar
thaha
New member | Level 2
2 years ago

Error in call to API function "files/list_folder": This function requires its argument in the HTTP r

  • I am integrating Dropbox with InfoLobby.
  • The integration works fine.
  • I can use the download endpoint successfully (This proves my integration is fine and is connected okay) - https://content.dropboxapi.com/2/files/download.
  • But I am not able to use any endpoint that requires a --data parameter in the body. I pass the body, still, the endpoint returns the error - Error in call to API function "files/list_folder": This function requires its argument in the HTTP request body, but your request body is empty. (below image)
  • Here's when I try to download something using the same integration. It works fine. 
  • Now if I do not use the integration and directly use the bearer token, that works fine too

 

Please advise why am I getting this error when trying to access the list of contents. Basically, why is Dropbox not recognizing the body that I submit?

Body:

{"path":"\/test","recursive":false,"include_media_info":false,"include_deleted":false,"include_has_explicit_shared_members":false,"include_mounted_folders":true,"include_non_downloadable_files":true} 

Error in call to API function "files/list_folder": This function requires its argument in the HTTP request body, but your request body is empty.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The /2/files/download and /2/files/list_folder endpoints use different formats, so those wold need to be implemented differently and so aren't a good comparison. The /2/files/list_folder endpoint is an RPC style endpoint, meaning that it requires the parameters JSON in the request body.

     

    The error message you received indicates that the API did not receive the parameters in the request body for that API call.

     

    It looks like you have the data for the parameters in "params", so you'll need to make sure that's getting properly sent in the request body. I can't offer help for third party network clients themselves, as they're not made by Dropbox, so I recommend referring to the documentation for your client for information on how to configure it.

     

    Also, I notice from the partial screenshots you shared that the two scenarios you have for /2/files/list_folder do not seem to be configured the same way: the working one has "content-type" set in "headers", and the non-working one has "content-type" set in "attribs". In addition to sending the parameters in the request body, make sure you are correctly setting the "content-type" header to "application/json".

    • thaha's avatar
      thaha
      New member | Level 2

      Thanks Greg, for your quick response.
      Contacted InfoLobby. They helped me sort it out. Amazing support in both places.