Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

AmandaCifuentes's avatar
AmandaCifuentes
Explorer | Level 4
6 years ago

File id not found for update

I am testing some endpoints in the Dropbox API Explorer.  Using the endpoint

/get_metadata

I get an id for a file like 

id: -x-m_bOc0rAAAAAAAAAA-A

Now I want to use the endpoint

/update

Therefore the id is required. When I enter the id:

-x-m_bOc0rAAAAAAAAAA-A

I get the error, that no file is found with that id.

What is the problem here? I don´t get it

4 Replies

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    6 years ago

    :laughing::grinning: Hi AmandaCifuentes,

    Use the id as is! If you remove leading part, Dropbox tries find a file with "-x-m_bOc0rAAAAAAAAAA-A"-like name, missing actually. :wink:

    Hope this cast extra light.

    ADD: Oh, Even more "get_metadata" is file operation and the id there is file id, but "update" is file request operation and the id there is file request id, not a file id! Be more careful - there are different id types.

  • AmandaCifuentes's avatar
    AmandaCifuentes
    Explorer | Level 4
    6 years ago

    Thank you for your quick answer. The problem is if I use

    id: -x-m_bOc0rAAAAAAAAAA-A

    it will tell me the following error:

    request body: id: 'id: -x-m_bOc0rAAAAAAAAAA_w' did not match pattern '[-_0-9a-zA-Z]+'

     

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    6 years ago

    Yes, because the id expected is file request id, not file id! As I noted above, they are different. :wink:

    Give an answer to yourself: What you are doing on? Files or Requests? And use corresponding API type, finally. Don't mix them!

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

    Здравко is correct; you're mixing "files" and "file requests" functionality. The "files" endpoints are for interacting with files, whereas the "file_requests" endpoints are for interacting with "file requests", which are a way for users to receive files from other people.

    If you want to update an existing file, that is, to upload a new version of a file, e.g., by specifying the file ID of the existing file, you can use /2/files/upload.

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!