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: 

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

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

ian_swensson
New member | Level 2

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)
})
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox 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 "()".

View solution in original post

2 Replies 2

Greg-DB
Dropbox 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
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?

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    ian_swensson New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?