cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: File id not found for update

File id not found for update

AmandaCifuentes
Explorer | Level 4

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 4

Здравко
Legendary | Level 20

: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
Explorer | Level 4

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]+'

 

Здравко
Legendary | Level 20

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
Dropbox Staff

Здравко 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.

Need more support?