We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

ian_swensson's avatar
ian_swensson
New member | Level 2
2 years ago

Dropbox API - 'path/not_found/' error on folders with parenthesis in the folder name.

When I access any folder with a parenthesis in the folder name, I get an error that the path doesn't exist. I assume it is a url encoding problem, but when I encode the URL it only encodes the spaces in the path and not the parentheses. Also encoding the URL makes the path of any other folder name fail.

Is there a work around to getting to folders with parentheses in the name?

 

Here is my code snippet:

const folderName = req.body.title
const path = `/${folderName}`

const dbx = new Dropbox({ accessToken: process.env.DROPBOX_ACCESS_TOKEN });
dbx.filesListFolder({ path })
.then(response => {
    const entries = response.result.entries;
    res.send(response.result.entries)
})
  • I see you're using the Dropbox JavaScript SDK, that should handle any encoding for you automatically. You should just pass in the correct path value as plain unencoded text. Don't apply any encoding to that value yourself.

     

    I just tried your code out, plugging in my own sample path value and access token, and it worked successfully for me when the path value contained "()".

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    I see you're using the Dropbox JavaScript SDK, that should handle any encoding for you automatically. You should just pass in the correct path value as plain unencoded text. Don't apply any encoding to that value yourself.

     

    I just tried your code out, plugging in my own sample path value and access token, and it worked successfully for me when the path value contained "()".

    • ian_swensson's avatar
      ian_swensson
      New member | Level 2

      Yea, I found the error was on my end. Turns out the folder did not exist so the path did not exist. Is there a way to delete this question as it is not an issue?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 4 hours ago
325 Following

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 or Facebook.

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!