cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out 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: 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
Go to solution

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
Go to solution

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
Go to solution

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
Go to solution

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?