You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Wookiee
9 months agoExplorer | Level 4
API delete by id:# via CURL
In one script in my FileMaker database solution, I upload a file to a constructed path, then save the unique id:xxxxxxxxxxxxxxxx number for that record, to tie the record to the file in the DropBox directory.
In another script, I wanted to delete the file by id:xxxxxxxxxxxxx and not by path. If I understand pathString(pattern="(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)") correctly, I should be able to do this, no?
curl -X POST https://api.dropboxapi.com/2/files/delete_v2 \
--header "Authorization: Bearer <get access token>" \
--header "Content-Type: application/json" \
--data "{\"path\":\"$idDBX"}"
//where $idDBX is the stored value of id:xxxxxxxxxxxxx
The result I get returned is "Error in call to API function "files/delete:2": Unexpected HTTP headers: "Dropbox-Api-Arg""
Wookiee, The question of mine was rhetoric! I hoped it'll direct you. Ok... can you see the difference of your 2 posts and figure out alone what's different and wrong or...?
PS: Everywhere some path can be used, the equivalent id can be used too. Even more a hybrid form may be used too: id of a folder followed by a relative path. In all cases that's NOT the issue (I assume the id is correct).
- WookieeExplorer | Level 4
I just took the code section from the dev API example... here are the args that is getting sent by FileMaker using it's "Insert from URL" script step:
-X POST --header "Content-Type: application/json" --header "Authorization: Bearer <redacted>" --header "Dropbox-API-Arg: {\"path\":\"id:m5ktIrz8BXoAAAAbAAAASg\"}" --dump-header
- ЗдравкоLegendary | Level 20
Wookiee, The question of mine was rhetoric! I hoped it'll direct you. Ok... can you see the difference of your 2 posts and figure out alone what's different and wrong or...?
PS: Everywhere some path can be used, the equivalent id can be used too. Even more a hybrid form may be used too: id of a folder followed by a relative path. In all cases that's NOT the issue (I assume the id is correct).
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,888 PostsLatest Activity: 14 hours 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!