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

Forum Discussion

alphasense-productintegrations's avatar
alphasense-productintegrations
New member | Level 2
6 months ago

How to download .paper and .papert shared file using APIs

I want to download the shared files having paper and papert extension but since shared files,

I list the files using sharing/list_received_files and in this I get the preview_url for the shared file, I use the preview_url to download to the content using sharing/get_shared_link_file but I get unsupported_link_type error in the API response.

I tried using the files/export API using id in the headers to export html but then I get path/not_found/ error in the API response.


How can I download paper and papert file content for a shared file.

 



8 Replies

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 months ago

    alphasense-productintegrations​ 

    My apologies, it appears as though the Dropbox API doesn't actually offer a way to download shared Paper docs directly, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 months ago

    alphasense-productintegrations​ 

    To further clarify: What value are you passing as the "path" when sending a request to /2/files/export

    Keep in mind that how you access Paper docs (which endpoints to use) depends on your version of Paper. You can find more details on the Paper Migration Guide.

    More specifically, depending on the version, you will need to use either /paper/docs/download or /2/files/export to download those Paper docs.

    If you determine that /2/files/export is the endpoint you need to download Paper docs, then the path you need to pass should look something like this "/path_to_file/file.paper". Alternatively, you can use the Path ID, which is not the same as the File ID. If using the Path ID, you will need to ensure you include "id:" in the value, as such "id:a4ayc_80_OEAAAAAAAAAYa".

    Lastly, the error "unsupported_link_type" from /2/sharing/get_shared_link_file is expected if the type of link is not supported, which would be the case with Paper docs.

  • Hi DB-Des​

    First you need to have some paper files that appear in the Shared section in dropbox platform that are shared explicitly with you, not the folder just the file.

    I am using following scopes "account_info.read file_requests.read files.content.read files.metadata.read sharing.read"

    Steps to reproduce:

     I am not able to add the code snippets directly as it is giving me HTML invalid tag error everytime. Please use these images to understand the issue.

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 months ago

    Hi alphasense-productintegrations​ 

    I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
    • 5-10 different 'X-Dropbox-Request-Id' response header values encountering the issue

About Discuss Dropbox Developer & API

Node avatar for 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!