One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
vin212
4 years agoExplorer | Level 3
How use the API on c++ aplication
Hello,
i code on QTCreator, i would like create an application for make a link between my deposit and the client. My question is, how i can use the API (or other solution) for creat the link between my app and my deposit.
For example, in my computer i have the file "tom.png" i would like upload on my deposit. For this, i open my application, i select my file and i click on the buttom "upload". But, i don't know how a do can this on background for send the document on my Dropbox.
I'm not sure, i really clear...
Thank your for your any answer and help.
- Greg-DB
Dropbox Staff
Dropbox does offer an API you can use for listing, uploading, and downloading files, among other operations. You can find everything you need to get started with the Dropbox API, including documentation and tutorials, here:
https://www.dropbox.com/developers
You may be interested in the Getting Started guide:
https://www.dropbox.com/developers/reference/getting-started
While Dropbox doesn't offer an SDK for C++ in particular, you could use a third party library, or call the HTTPS endpoints directly:
https://www.dropbox.com/developers/documentation/http/documentation
For example, to upload a file, check out /2/files/upload:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
- vin212Explorer | Level 3
thank you for your answer, in my app, i could be use CURL for this.
But, i don't understand how we use the API. For test , i launch on my CMD this command :curl -X POST https://api.dropboxapi.com/2/file_requests/count --header "Authorization: Bearer <oauth2_access_token>"
and is don't work i have this error message :
Error in call to API function "file_requests/count": The given OAuth 2 access token is malformed.And for finish i don't understand how i acces on my deposit by the API
- Greg-DB
Dropbox Staff
The "<oauth2_access_token>" there is just a placeholder, and should be replaced with the actual OAuth 2 access token for the account. From the error message, it sounds like you're sending an invalid value for that (either the placeholder itself, or an invalid access token string). You should check what you're actually sending and correct it so that you're sending the valid OAuth 2 access token. You can find more information on how this process works in the OAuth Guide and authorization documentation.
About Discuss Dropbox Developer & API
Make connections with other developers803 PostsLatest Activity: 2 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!