Welcome to the new Box Support website. Check out all the details here on what’s changed.

download file request returns 404 error

Answered
New post

Comments

4 comments

  • Murtza

     As you mentioned, the Download File endpoint uses a file's id and not its name as the primary identifier. File id is in the format of "123456".

    0
    Comment actions Permalink
  • bbongrip

    ok thats what i thought.  what is the proper way to get the file id then.  I'm using swift but can also read c#.  From what i found, i have to get the folder and then get the file from there.  So this brings up the same problem.  To get the folder, i need the folder id as well.  so I'm stumped as to how i get the id's so actually search/download folders and files.  Thanks in advance for your help. 

    0
    Comment actions Permalink
  • Murtza

     There are a few ways to get a file's id:

    • When you upload a file, the API returns back the file id in the response. 
    • You can search for a file by its name using the Search endpoint
    • You can query the User Events endpoint for ITEM_UPLOAD events. This will return a list of recently uploaded files with their ids.
    • If you know the folder id where the file was uploaded, you can call the Get Folder Items endpoint.
    0
    Comment actions Permalink
  • bbongrip

    awesome thank you!!

    0
    Comment actions Permalink

Please sign in to leave a comment.