Learn how to make the most out of the Dropbox Community here 💙. 

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.