Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!
Forum Discussion
af11
4 years agoExplorer | Level 4
dropbox.exceptions.BadInputError
I am trying to connect an app to my company dropbox account.
Here is the code:
from hashlib import sha256
import hmac
import json
import os
import threading
import urllib.parse
from dotenv i...
- 4 years ago
The DropboxTeam.as_admin method returns a Dropbox object; it doesn't modify the existing DropboxTeam object (dbx in your latest snippet here). So, the code in your latest snippet won't allow you to call files_list_folder on that 'dbx' object. You should save the returned Dropbox object and use that instead.
af11
4 years agoExplorer | Level 4
Thank you.
I did that now:
id = os.environ.get('USER_ID')
dbx = DropboxTeam(token)
dbx.as_admin(id)
But now, I can't do all the methods that I did in the Dropbox class above, for example files_list_folder().
How can I be able to do these methods?
Здравко
4 years agoLegendary | Level 20
af11 wrote:...
I did that now:
id = os.environ.get('USER_ID') dbx = DropboxTeam(token) dbx.as_admin(id)But now, I can't do all the methods that I did in the Dropbox class above, for example files_list_folder().
...
Hi af11,
Hmm... 🤔 Where you are keeping Dropbox object resulting from the last call in your code? ... Or maybe, by mistake, you are trying call Dropbox methods on DropboxTeam object?! 🙂 Be more careful. Take a look once back on the documentation provided by Greg-DB above (note what 'as_admin' returns) and try again. 😉
Hope this helps.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,959 PostsLatest Activity: 17 hours ago
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!