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

Forum Discussion

bszt123's avatar
bszt123
Helpful | Level 5
2 years ago
Solved

Dropbox API error with 500

Greetings,

 

I am encountering the following error while calling the Dropbox API:

 

InternalServerError('6c7329b49922471380831b2b3f2fb49c', 500, '{"error": "The server has either erred or is incapable of performing the requested operation."}')

 

Below is the Python code for the API call:

self.dbx = dropbox.Dropbox(self.app_token).with_path_root(dropbox.dropbox_client.PathRoot.root('8297511184')) result = self.dbx.files_list_folder(path)

 

I would like to request clarification on the cause of the above error.

 

Best regards,

SangWoon Yoon

14 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Thanks, that's helpful. It looks like you're actually hitting a different issue now. It appears you're sending an improperly formatted Authorization header value. Please remove any leading or trailing whitespace from your access token string (self.app_token in this code snippet) and try again.

  • bszt123's avatar
    bszt123
    Helpful | Level 5
    2 years ago

    You're right! there's some whitespace in our token string. thank you for your help.

     

    After removing the whitespace, we've encounter an error below:

     

    ('feefc7a078c647338e0c5381bc129ff8', 400, 'Error in call to API function "users/get_current_account": Invalid select user id format')

     

    ('61bd222a697c4c4586ec7954d87ae3bb', 400, 'Error in call to API function "users/get_current_account": Invalid select user id format')

     

    ('e809c790be5a4994a0612d593f8b1be5', 400, 'Error in call to API function "users/get_current_account": Invalid select user id format')

     

    ('89e8b8eb91904084824fb114ae56eaa3', 400, 'Error in call to API function "users/get_current_account": Invalid select user id format')

     

     

     

    Here is the latest version of the code we are currently using:

    some_id = 'example@pping.kr'

    self.dbx = dropbox.DropboxTeam(self.app_token).as_user(some_id)
    root_namespace_id = self.dbx.users_get_current_account().root_info.root_namespace_id
    self.dbx.with_path_root(dropbox.common.PathRoot.root(root_namespace_id)).files_list_folder(path)

     

    Is there a mistake while using user_id? 

  • bszt123's avatar
    bszt123
    Helpful | Level 5
    2 years ago

    It works. Thank you!

     

    Yet we have another issue with the refresh token, but we will ask about this in another thread next time.

     

    Thank you again.

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!