Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Walter Whitman Moore's avatar
Walter Whitman Moore
Explorer | Level 4
5 years ago

Filemaker Pro web viewer access to Dropbox via API and "insert from URL" command

I'm a trial lawyer rather than a programmer, so please forgive in advance my ignorance about programming; I don't know my Java from my Python from my cURL, but I generally figure out how to get things done.

I have made an app using FileMaker Pro, and I would like it to work with DropBox.

In particular, when a user highlights a record in FileMaker Pro, I would like FileMaker Pro's web viewer to display the document via a URL to DropBox.

I am able to do this if I get individual shareable links, file by file, but that is too slow.

So I've spent hours reading about and trying to implement the feature called /create_shared_link_with_settings.

I set up a DropBox app, and got the token, etc.

I get really, really close, but not quite success. The closest I've come is to get an error re "shared link already exists." (The exact message was, "{"error_summary": "shared_link_already_exists/..", "error": {".tag": "shared_link_already_exists"}}.")

I found an article on how to fix it, but it was over my head. (https://stackoverflow.com/questions/46514268/shared-link-already-exists-dropbox-api-v2)

Can someone out there please layout exactly what my Filemaker Pro "insert from URL" script should say for a given FILE NAME and a given FILE PATH? I'm so close, it's driving me crazy, and I figure it's super simple for someone out there.

Thanks in advance.

Cordially,

Walter Whitman Moore

6 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    I can't help with FileMaker Pro itself as that's not made by Dropbox, but I'll try to offer whatever guidance I can on the Dropbox side of things.

     

    If you want to create a shared link for any particular file or folder, calling /2/sharing/create_shared_link_with_settings is the correct way to do so. Note though that this only allows you to create a new shared link when one does not already exist. If there's already a shared link for the specified item, you will get that 'shared_link_already_exists' error. If/when you get that error, if you wish to just retrieve the existing shared link, you should then have your code call /2/sharing/list_shared_links. That would return any existing shared links.

     

    I can't write your code for FileMaker Pro for you, but the Dropbox API v2 Explorer may be helpful. That's an easy way to prototype and test calls against the Dropbox API, such as for /2/sharing/create_shared_link_with_settings and for /2/sharing/list_shared_links.

  • Walter Whitman Moore's avatar
    Walter Whitman Moore
    Explorer | Level 4
    5 years ago

    Thanks for your reply. Could you at least tell me how, in Dropbox API language, to tell Dropbox that IF the link already exists, THEN apply this other command? For example, is it something like, "If tag = already 'exists' then /2/sharing/list_shared_links?

    If you could just give that one bit of DropBox API lingo, I think I could solve it from there.

    Thanks in advance. I really want to make this work. : )

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    There isn't a way to have the API itself automatically perform logic and additional calls for you like this. The /2/sharing/create_shared_link_with_settings and /2/sharing/list_shared_links routes are distinct endpoints on the Dropbox API, and each require their own request from the API client (i.e., the code calling the API, such as your FileMaker Pro code in this case). You'll need to write your code with whatever logic, calls, and processing are needed for your use case.

     

    It is worth noting that in some cases, the Dropbox API will return the information for the existing shared link in the 'shared_link_already_exists' error itself from the /2/sharing/create_shared_link_with_settings endpoint to begin with, but this isn't guaranteed to always be included, so you would still need to implement the code to call /2/sharing/list_shared_links anyway, for when it isn't.

  • Walter Whitman Moore's avatar
    Walter Whitman Moore
    Explorer | Level 4
    5 years ago

    I'm sure DropBox doesn't need any advice from me, but it sure would be nice -- and presumably increase sales -- if there were an easy way to access DropBox files in FileMaker Pro (which has many, many users) just as there already is in Microsoft Word. I'm sure someone at DropBox could come up with the code in a few hours or minutes, and it would create a huge potential market for people who manage terabytes upon terabytes of files using FileMaker Pro. Just sayin'.  : )

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    Thanks for the feedback!

  • Walter Whitman Moore's avatar
    Walter Whitman Moore
    Explorer | Level 4
    5 years ago

    My pleasure. IMHO, DropBox is far superior to other options (e.g., Box, Google Drive and OneDrive). It's easy to use, synchronizes files quickly and smoothly, and the "rewind" feature is terrific.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from 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!