We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
jmarbutt
7 days agoNew member | Level 2
Invalid Folder Name with Team API
I am trying to create folders using the api in a team folder like this:
// Get Namespace ID
const dbx = new Dropbox({ accessToken: process.env.DROPBOX_ACCESS_TOKEN });
const baseFolder = "/Data Transfers";
const customerFolder = `${baseFolder}/${folder_name}`;
const dataFolder = `${customerFolder}/data`;
// Create a folder in dropbox
await step.run('create-customer-folder', async () => {
console.log(customerFolder);
await dbx.teamTeamFolderCreate({ name: customerFolder });
await dbx.filesCreateFolderV2({ path: dataFolder });
});
This should be just to create a folder under our team /Data Transfers/TestFolder but it is giving me an Invalid Folder name, what am I doing wrong? I am just getting started with the API and I am completely lost.
- iNeilDropbox Engineer
Hi jmarbutt,
Based on the information you provided, you would like to create a folder within your team folder. The error message “invalid_folder_name” would occur if the name you provided is not valid for creating a team folder when using the 2/team/team_folder/create endpoint.That said, to create a folder within your team folder, you should use the 2/files/create_folder_v2 endpoint and not the 2/team/team_folder/create Endpoint. Please test the conditions while using the 2/files/create_folder_v2 endpoint to create a folder within your team folder.
If your account is connected to an updated team space configuration, please bear in mind, by default the API calls to the Dropbox API operates in the "member folder" of the connected account and not the "team space" where team folders are located. You can configure API calls to operate in the "team space" by setting the "Dropbox-API-Path-Root" header with your Dropbox API request. For further information, please review the following link:
- API updates to better support team spaces
- Using the Dropbox-API-Path-Root Header
- Identifying Root Namespaces
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf 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!