Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Jeff B.63
3 years agoCollaborator | Level 9
Get a folders public link using the dropbox API in Azure logic apps
We use Dropbox to store pictures from every jobsite we work on. The estimator puts his pics in the folder for the crews to view and later the crews put their images in the same folder. I have been ...
- 2 years ago
Jeff B.63 wrote:The example in the blog uses curl but I need HTTP. I tried the online conversion tool from GitHub but it just gets syntax errors. ...
Hi Jeff B.63,
You can add -v option (verbose) in every curl command and you'll get entire HTTP request in the console output as is. 😉
Jeff B.63 wrote:... I have my AppKey and AppSecret but what is the authorization code and do I need a redirect URI since I want the response to come right back to the HTTP request?
The authorization code is something you should receive from the authorization page where you (or your application user - whoever is) grant permission to access account resources. It can be copied by hand or received automatic using redirect URI - the choice is yours. So, no, it's not mandatory usage of redirect URI. Take a look here how you can perform the same without redirect URI.
Hope this helps.
Jeff B.63
2 years agoCollaborator | Level 9
After a long while I am finally getting back to this issue.
I have tried the API v2 Explorer and can get the call to work but when I view the code for HTTP, my logic app has all the same content with the exception of User-Agent which in the Explorer shows as
User-Agent: api-explorer-clientDo I need to insert my own API name in there for the app that I created and has the same API Key?
Greg-DB
Dropbox Community Moderator
2 years agoJeff B.63 Здравко is correct; while the 'User-Agent' value is meant to contain the app's name, it does not impact the functionality of the API call.
If the call is still not working for you, make sure the app is formatting the request correctly. It may help to print out the actual HTTP request, if possible. (If you share that here, be sure to continue to redact the access token though.)
- Jeff B.632 years agoCollaborator | Level 9
I am getting the error
Error in call to API function "sharing/create_shared_link_with_settings": Unexpected URL params: "path"
The JSON for that HTTP request was:
{"method": "POST","queries": {"path": "D:\\DRYBSMT Dropbox\\Jeff Brown\\~ Pictures - All\\Share Link Testing\\1"},"headers": {"Authorization": "*sanitized*","Content-Type": "application/json"}}In the Logic Apps HTTP step, the code view looks like this:{"inputs": {"method": "POST","headers": {"Authorization": "*sanitized*","Content-Type": "application/json"},"queries": {"path": "D:\\DRYBSMT Dropbox\\Jeff Brown\\~ Pictures - All\\Share Link Testing\\1"}}}The code produced by the API Explorer is:POST /2/sharing/create_shared_link_with_settings Host: https://api.dropboxapi.com User-Agent: api-explorer-client Authorization: *sanitized* Content-Type: application/json { "path": "D:\\DRYBSMT Dropbox\\Jeff Brown\\~ Pictures - All\\Share Link Testing\\1" }The Logic Apps HTTP data window looks like this:
Finally, the section of the overall JSON that applies to the request is this:
"HTTP": {"inputs": {"headers": {"Authorization": "*sanitized*","Content-Type": "application/json"},"method": "POST","queries": {"path": "D:\\DRYBSMT Dropbox\\Jeff Brown\\~ Pictures - All\\Share Link Testing\\1"},},"runAfter": {"Compose": ["Succeeded"]},"type": "Http"}}- Greg-DB2 years ago
Dropbox Community Moderator
Jeff B.63 It looks like you are supplying the "path" parameter as a URL parameter; it instead needs to be supplied in JSON in the request body. You can find more information in the documentation for the /2/sharing/create_shared_link_with_settings endpoint, as well as the documentation for the RPC format it uses.
You can also use the API v2 Explorer to see how the call should be constructed. For instance, click "Show Code" and select "View request as" "HTTP request".
By the way, your path value doesn't look like a valid Dropbox path. It looks like local Windows file path. I suggest reading the File Access Guide for information on interacting with files on the Dropbox API.
- Jeff B.632 years agoCollaborator | Level 9
Yes, sorry, I accidentally used the local path when creating the post but I have been using the correct path in my testing.
I have looked through the documentation as well as used the API Explorer.
The code produced by it under HTTP is:
POST /2/sharing/create_shared_link_with_settings Host: https://api.dropboxapi.com User-Agent: api-explorer-client Authorization: *sanitized* Content-Type: application/json { "path": "\\~ Pictures - All\\Share Link Testing\\1" }When I look at the JSON for the Query in the HTTP step, it is identical to what the Explorer is showing.
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!