cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Dropbox API error with 500

Dropbox API error with 500

bszt123
Helpful | Level 5

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 14

bszt123
Helpful | Level 5

Sorry, I think I posted the old version of the code.

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

 

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)


And Here's some error outputs we encountered : 


InternalServerError('6bc6a197ce6243f3b7a405839b333601', 500, '')

InternalServerError('fd33a6a27af3434b960e78daea94ac71', 500, '')

InternalServerError('c5665dbc98c44f8bad19562e4c1c49ca', 500, '')

InternalServerError('e31a5e86e64d4193801bb3d41e070740', 500, '')

InternalServerError('ac9967c17ab2485aa0d9e0f65f9bf136', 500, '')

InternalServerError('614843bd85c24b98abe66c76bfa04be0', 500, '')

InternalServerError('c1e440b9e8e244acb9c61a0d53195acc', 500, '')

 

Thank you for your support!

Greg-DB
Dropbox Staff

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
Helpful | Level 5

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? 

Greg-DB
Dropbox Staff

Yes, that error indicates an issue with the value passed to as_user. The as_user method requires a team member ID, not an email address. You can get team member IDs from team_members_get_info_v2 or team_members_list_v2 and team_members_list_continue_v2, for example.

bszt123
Helpful | Level 5

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.

Need more support?