We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
lucasromeiro
7 years agoExplorer | Level 3
Uploading files by ESP8266 HELP
Hello! I'm trying to access Dropbox to save my files in the cloud using an ESP8266, programming in Arduino! Has anyone ever managed to do this? I found an HTTP Developer API page. Maybe with an H...
Greg-DB
7 years agoDropbox Staff
The Dropbox API does offer the ability to upload files programmatically. For example, you can use /2/files/upload:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
The documentation there has an example of calling that endpoint via curl. We don't have any resources for Arduino/ESP8266 specifically, but you can translate that example/documentation for whatever HTTPS client you're using.
Also, that's a link to the documentation for the HTTPS endpoint itself, but we recommend using one of the official SDKs if possible:
https://www.dropbox.com/developers/documentation
Those have corresponding native methods for the HTTPS endpoints.
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
The documentation there has an example of calling that endpoint via curl. We don't have any resources for Arduino/ESP8266 specifically, but you can translate that example/documentation for whatever HTTPS client you're using.
Also, that's a link to the documentation for the HTTPS endpoint itself, but we recommend using one of the official SDKs if possible:
https://www.dropbox.com/developers/documentation
Those have corresponding native methods for the HTTPS endpoints.
- lucasromeiro7 years agoExplorer | Level 3
Hello can you help me?
it's just an example of how the POST format I'm sending.
then I do not adapt to the dropbox.
above I showed a POST that did not do my project.
Please help me !!! - lucasromeiro7 years agoExplorer | Level 3
I'm sending this way:
POST /2/auth/token/from_oauth1 HTTP/1.1
Host: api.dropboxapi.com
Content-Type: application/x-www-form-urlencoded
Content-Length: xx
curl -X POST https://api.dropboxapi.com/2/auth/token/from_oauth1 \
--header "Authorization: Basic <MY CODE>" \
--header "Content-Type: application/json" \
--data "{\"oauth1_token\": \"qievr8hamyg6ndck\",\"oauth1_token_secret\": \"qomoftv0472git7\"}"but I get this:
HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 23 Apr 2018 04:04:30 GMT
Content-Type: text/html
Content-Length: 264
Connection: close
X-Frame-Options: DENY
Content-Security-Policy: sandbox; frame-ancestors 'none'
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename='error'
can you help me ???
I can not make progress.
thank you!- Greg-DB7 years agoDropbox StaffFrom the sample you provided, I see that you're trying to call /2/auth/token/from_oauth1, but are just using the oauth1_token and oauth1_token_secret values from the documentation itself. This endpoint is only meant for use if you already have pre-existing OAuth 1 access tokens, which you would plug in there instead of the sample values from the documentation. If you are only starting development now, you would not have OAuth 1 access tokens and so should not be using this endpoint.
If you don't have pre-existing OAuth 1 access tokens, you should send the user through the normal OAuth 2 app authorization flow. You can find information on how that works in the OAuth guide here:
https://www.dropbox.com/developers/reference/oauth-guide
The documentation for the OAuth 2 app authorization flow can be found here:
https://www.dropbox.com/developers/documentation/http/documentation#authorization- lucasromeiro7 years agoExplorer | Level 3
Hello Greg!
Thanks for the answer!
I have already registered the application and have token, app key and app secret.
I already used it in the model I posted above. But nothing changes ...
To solve my problem, I would like your help.
Can you send me 2 complete POST examples (what will the server receive, all the characters) ??
- An example for authentication.
- Another example, to send a file or to list the existing files or folders.
With these 2 examples I can modify and create a library for Arduino!
But I need the FULL information. The whole structure of POST done. (what the server will receive)
Because in Arduino we have to do everything at hand ... I need to know all the characters sent, understand?
Kindly help me ... These 2 examples will help me a lot and other people too!Sorry to ask you that. I hope you can help me.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 2 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!