Forum Discussion

5 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    The /1/save_url endpoint doesn't support the GET method, so you should use the POST method to call this endpoint. 

    Exactly how you change what method you're using will depend on your HTTP client. For example, with curl on the command line you would supply the option "-X POST".

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

    You need to URI escape your parameters. In your sample, you're not escaping the whitespace in the destination, which is breaking up the pieces you're giving to curl, corrupting the command. That is, curl thinks you mean "PM" is another host you want to connect to.

    Your curl command should probably look something like:

    curl "https://api.dropbox.com/1/save_url/auto/615%20PM%20%231008928.PDF" \
    -H "Authorization: Bearer auth_token_key" \
    -d url="http%3A%2F%2Fwww.minnpar.com%2Fpartbooks%2FBACKHOE%2520MANUALS%2FALLIS%2520CHALMERS%2520BACKHOE%2520MANUALS%2F615%2520PM%2520%25231008928.PDF"
  • nethaji r.'s avatar
    nethaji r.
    New member | Level 1
    10 years ago

    Thank you it's working.

    Still I have some doubts

    1) Can I upload a folder which contains sub folders and files via API ?

    Because drag & drop method is not working on website interface.

    2) Can I upload a file to other dropbox account via API?

    Thank you

     

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

    1) The /save_url endpoint only supports individual files, but you can call it repeatedly to save multiple files. Also, any parent folders that don't exist in the paths you specify will automatically get created.

    2) You can make API calls to whatever accounts you have access tokens for.

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!