We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
seescan
7 years agoExplorer | Level 3
C# upload file with username and password
is it ok to upload file with username and password without app access token? if no, can I create app access token by using username and password in C#.
Thanks
3 Replies
- Greg-DB7 years ago
Dropbox Community Moderator
No, the Dropbox API doesn't offer a way for your app to upload files or create access tokens directly from the username and password.
You should use the OAuth app authorization flow to get an access token, so your app never directly handles the user credentials. You can find more information on how this works here:
https://www.dropbox.com/developers/reference/oauth-guide
Once your app has an access token, it should store and re-use it for future calls.
- seescan7 years agoExplorer | Level 3
Using oauth to get access token, do I need to have app key and app secrect? Is anyway we can get the access token by user credentials?
- Greg-DB7 years ago
Dropbox Community Moderator
You do need to register an API app to use the OAuth app authorization flow. You generally only need to do this once though. If you haven't already, you can do so here.
To use the "token" flow, you only need the app key (and a redirect URI of your choosing); to use the "code" flow, you need both the app key and secret. You can find more information in the documentation.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,034 PostsLatest Activity: 3 hours ago
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 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!