Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello, I can't get my code Python to work. Can you help me?
When you get a 400 error like this, be sure to print out the response body, as it should contain a more specific error message indicating what the issue is. If you need help with that error, please print it out and share it.
Also though, I notice that you're importing and using both 'dropbox' and 'requests', and you're using 'requests' to call the /2/files/create_folder_v2 endpoint yourself. We recommend using the official SDKs, such as 'dropbox' whenever possible though, and it implements native methods for the endpoints for you, so you don't need to use a network client directly, like you are with 'requests'. Specifically, instead of calling /2/files/create_folder_v2 with 'requests', you can use the provided files_create_folder_v2 method on the Dropbox class.
I notice you are using the 'Dropbox-API-Select-User' header; that's also available natively on DropboxTeam via the as_user method, which would then give you a Dropbox object which you can then use to call files_create_folder_v2, etc.
Hi there!
If you need more help you can view your support options (expected response time for a 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!