You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

synology_support's avatar
synology_support
Explorer | Level 4
2 years ago

The usage returned by get_space_usage is not updated

Below is the response of get_space usage. The used field (eg. 70850370743139) used to update whenever a file is uploaded, but it stopped updating even the file is uploaded, is there a problem in dropbox server now?
{
    "used"70850370743139,
    "allocation": {
        ".tag""team",
        "used"70850370743139,
        "allocated"124244813938688,
        "user_within_team_space_allocated"0,
        "user_within_team_space_limit_type": {
            ".tag""off"
        },
        "user_within_team_space_used_cached"70859152274418
    }
}
Best regards,
Ethan Fang
  • Здравко's avatar
    Здравко
    Legendary | Level 20

    Hi synology_support,

    To be clear what's going on with your account using your application, let's do a test. Wipe temporary all team scopes, if any, out of your application' permissions (and after the test, bring them back, again if any). Execute following commands one by one in the same order:

    curl -X POST https://api.dropboxapi.com/2/users/get_space_usage -H 'Authorization: Bearer sl.<YOUR ACCESS TOKEN>' -H 'Content-Type: application/json' --data 'null'
    curl -X POST https://content.dropboxapi.com/2/files/upload -H 'Authorization: Bearer sl.<YOUR ACCESS TOKEN>' -H 'Content-Type: application/octet-stream' -H 'Dropbox-API-Arg: {"path":"/some-dummy-file.txt"}' --data '0123456789'
    curl -X POST https://api.dropboxapi.com/2/users/get_space_usage -H 'Authorization: Bearer sl.<YOUR ACCESS TOKEN>' -H 'Content-Type: application/json' --data 'null'
    curl -X POST https://api.dropboxapi.com/2/files/delete_v2 -H 'Authorization: Bearer sl.<YOUR ACCESS TOKEN>' -H 'Content-Type: application/json' --data '{"path":"/some-dummy-file.txt"}'
    curl -X POST https://api.dropboxapi.com/2/users/get_space_usage -H 'Authorization: Bearer sl.<YOUR ACCESS TOKEN>' -H 'Content-Type: application/json' --data 'null'

    Replace sl.<YOUR ACCESS TOKEN> to actual access token generated on the application page. Post the result in your next post, so we able see what's going on. Mask the token you will use.

    You can do the same test without changing permissions, but have  to add header with your member id to all calls.

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

    synology_support Thanks for the report! Здравко detailed some steps to follow to illustrate the issue if you can, which may be helpful. We'll also look into it regardless. I'll follow up here with any news on this.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 2 days ago
333 Following

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!