Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

tasos91's avatar
tasos91
Explorer | Level 3
5 years ago
Solved

Cannot download a file through the api call

I cannot download files with the api-call bellow    curl --location --request POST 'https://content.dropboxapi.com/2/files/download' \ --header 'Authorization: Bearer <REDACTED>' \ --header 'Cont...
  • Greg-DB's avatar
    5 years ago

    It looks like the file you're referring to is located in the "team space". API calls default to the "member folder", not the team space though, so to access anything in the team space you will need to also specify the "Dropbox-API-Path-Root" header. Please refer to the Team Files Guide for information on using that:

     

    https://developers.dropbox.com/dbx-team-files-guide

     

    By the way, note that access tokens enable access to Dropbox accounts/teams, so for the sake of security, you should never share access tokens like this. I redacted it from your post, but since this access token has been shared here, you should disable this access token. You can do so by revoking access to the app entirely, if the access token is for your team and you are a team admin, here:

    https://www.dropbox.com/team/admin/settings/team_apps

    Or, you can disable just this access token using the API:

    https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke

    Note that doing so will cause any further API calls made using this access token to fail. This cannot be undone, and you would need to get a new access token to replace this one.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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, Facebook or Instagram.

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!