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 using an Azure logic app to create the folders I need by using a constructed folder path and creating a txt file. I then delete the file afterwards. But I can't find any way to get the public link for the folder using Logic Apps.
I can do it in Zappier but that just gets stupid expensive in short order.
Has anyone found a way to get the public link?
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.
24 Replies
Replies have been turned off for this discussion
- Greg-DB2 years ago
Dropbox Community Moderator
Jeff B.63 I see you have changed the parameter data to be JSON, but you still have it in the "Queries" section for your client. I can't offer support for your client itself, but it appears your client sends that as URL parameters. That JSON needs to be sent in the request body, so you probably need to put that in the "Body" section instead.
Also, the path value itself still doesn't look correct. It looks like you would want something like this:
"/~ Pictures - All/Share Link Testing/1" - Jeff B.632 years agoCollaborator | Level 9
Thank you for your help. I was able to get it working finally. I am just not sure which reply to mark as the answer.
- Jeff B.632 years agoCollaborator | Level 9
My next quandary is keeping or refreshing the token so it doesn't expire. Can you point me in the right direction?
- Greg-DB2 years ago
Dropbox Community Moderator
Jeff B.63 Dropbox issues short-lived access tokens which expire after a few hours. Apps can get long-term access by requesting "offline" access, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. Refresh tokens do not expire automatically and can be used repeatedly. You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.
- Jeff B.632 years agoCollaborator | Level 9
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. 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?
- Здравко2 years agoLegendary | Level 20
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.632 years agoCollaborator | Level 9
I just tried the first step in your instructions and the browser returned an error "invalid client id".
Do I need to apply for production on the App or something?
- Здравко2 years agoLegendary | Level 20
Jeff B.63 wrote:...
Do I need to apply for production on the App or something?
No. Probably mistake in copy/paste.
I just tried too and everything works. Make sure you copy your client ID correct - even one symbol messed and... you saw the result. 🙋
- Jeff B.632 years agoCollaborator | Level 9
Thanks Здравко, It was because I left the brackets in.
- Jeff B.632 years agoCollaborator | Level 9
Worked perfectly, Thank you. do I now just use the refresh token as the access token in all of my http calls?
Authorization: Bearer <Refresh token>
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!