We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
novaut
3 years agoExplorer | Level 4
I'm struggleing to download a single file from the API
Hello there,
I'm struggleing to download a single file from the API.
I'm supplying the app key and secret for App Authentication but I'm getting this error:
Error in call to API funct...
- 3 years ago
novaut wrote:...
One question for how long refresh_token is alive? Is it long-lived?
...
Hi novaut,
Yes, it's long lived token. The refresh token remains valid till explicit revoke either from application itself or user that granted access for your application to its data.
novaut wrote:...
I successfully got the file from Dropbox using the refresh_token and it doesn't ask for http authentication 🙂
...
You make me doubt you have understand everything correctly. You can download a file only with access token authentication, not directly with refresh token!!! The refresh token helps you keep receiving valid access token without further user actions. 😉 Hope this was just a confusion while typing.
Good luck.
Здравко
Legendary | Level 20
Greg-DB wrote:... For instance, the examples under "App Authentication" show the use of /2/files/get_thumbnail_v2, which does support App Authentication, ...
🤔 Hm.. really... let's see this ' for instance':
curl -X POST "https://content.dropboxapi.com/2/files/get_thumbnail_v2" -u "<APP_KEY>:<APP_SECRET>" \ --header "Dropbox-API-Arg: {\"resource\": {\".tag\": \"path\",\"path\": \"/a.docx\"},\"format\": \"jpeg\",\"size\": \"w64h64\",\"mode\": \"strict\"}"curl -X POST "https://<APP_KEY>:<APP_SECRET>@content.dropboxapi.com/2/files/get_thumbnail_v2" \ --header "Dropbox-API-Arg: {\"resource\": {\".tag\": \"path\",\"path\": \"/a.docx\"},\"format\": \"jpeg\",\"size\": \"w64h64\",\"mode\": \"strict\"}"curl -X POST "https://content.dropboxapi.com/2/files/get_thumbnail_v2" \
--header "Authorization: Basic <base64(APP_KEY:APP_SECRET)>" \ --header "Dropbox-API-Arg: {\"resource\": {\".tag\": \"path\",\"path\": \"/a.docx\"},\"format\": \"jpeg\",\"size\": \"w64h64\",\"mode\": \"strict\"}"
Which one is correct? 🧐 If any...
... Where is the error? 🙋
Greg-DB
3 years agoDropbox Staff
Здравко Those three examples show three different ways of supplying the app key and secret to curl. I seems you're hinting that the calls overall don't make sense otherwise though as the use of the "path" in the sample parameters won't work for app authentication in particular. I'll ask the team to fix that up.
- novaut3 years agoExplorer | Level 4
Hi Здравко,
I understood how it works.
One question for how long refresh_token is alive? Is it long-lived?
I successfully got the file from Dropbox using the refresh_token and it doesn't ask for http authentication 🙂
Thank you so much for your help 🙂
- Здравко3 years agoLegendary | Level 20
novaut wrote:...
One question for how long refresh_token is alive? Is it long-lived?
...
Hi novaut,
Yes, it's long lived token. The refresh token remains valid till explicit revoke either from application itself or user that granted access for your application to its data.
novaut wrote:...
I successfully got the file from Dropbox using the refresh_token and it doesn't ask for http authentication 🙂
...
You make me doubt you have understand everything correctly. You can download a file only with access token authentication, not directly with refresh token!!! The refresh token helps you keep receiving valid access token without further user actions. 😉 Hope this was just a confusion while typing.
Good luck.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf 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!