Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
TimCadieux
10 months agoNew member | Level 1
Using the DropBox API to host files for a public website (.net 9 Blazor)
My client has 100,000s of images stored in dropbox. The goal is to have some database information displayed alongside any one of the images. From what I understand, I would need need to use a servi...
DB-Des
Dropbox Community Moderator
10 months agoHi TimCadieux,
The code returned from the auth URL: https://www.dropbox.com/oauth2/authorize?client_id=&token_access_type=offline&response_type=code is an authorization code, not a refresh token.
To obtain a refresh token, you would first need to send a request to /oauth2/token with the value of the authorization code, from the first step. Below is the cURL equivalent for that request:
curl https://api.dropbox.com/oauth2/token \
-d code=<AUTHORIZATION_CODE> \
-d grant_type=authorization_code \
-d client_id=<APP_KEY> \
-d client_secret=<APP_SECRET>
The response from the above request will contain a refresh token value. You can then use that refresh token value to execute the code snippet you originally shared.
Feel free to reference our OAuth Guide and authorization documentation for any additional information.
About Discuss Dropbox Developer & API
Make connections with 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!