cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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: 

App developer

Highlighted

App developer

New member | Level 2

I'd like to use copy_batch function to copy some files from a folder to another folder. Even though the code looks fine, I receive the "In Progress" result. When I checked the app developer instruction, I realized that the function needs two authentications: User Authentication (Which I have) and Dropbox-API-Select-Admin (Team Admin) (Which I don't know if I have it). Could it be the issue I'm not able to use this function? Since I am a single user, does it mean that I'm the team admin?

Thanks for your help

1 Accepted Solution

Accepted Solutions
Highlighted

Re: App developer

Dropboxer

You can check what the specific returned error means in the documentation:

https://www.dropbox.com/developers/documentation/http/documentation#files-copy_batch-check

For instance, click on 'RelocationBatchV2Result', and so on, to drill down to the relevant error. 

In this case, for 'Error.entries.failure.relocation_error.to.conflict.folder', that means "Couldn't write to the target path because there was something in the way.", and specifically, "There's a folder in the way.".

That is to say, the copy failed because there was already a folder at the "to_path" you specified as the destination for the copy operation. 

Are you trying to copy the item into the folder you specified? Note that when configuring the copy job, you should specify the full path where you want to put the copy, not just the parent folder. For example, to copy a file named "test.txt" into an existing folder named "Folder", the "to_path" would be "/Folder/test.txt", not just "/Folder".

View solution in original post

5 Replies 5
Highlighted

Re: App developer

Dropboxer

The "authentication" section of a Dropbox API endpoint's documentation lists the supported authentication types for the endpoint. You can use any one of these to call the endpoint; you do not need to use all of them. 

If you're using a "Dropbox API" app, e.g., with the "full Dropbox" or "app folder" permission, you're using "User Authentication". The "Dropbox-API-Select-Admin (Team Admin)" type would only be used by "Dropbox Business API" apps.

Anyway, the /2/files/copy_batch[_v2] endpoints work asynchronously, so you'll need to call /2/files/copy_batch/check[_v2] to check the status of the job. If you get 'in_progress', that means the job hasn't completed yet, so you'll need to keep calling back occasionally until it does, to get the 'complete' result.

Highlighted

Re: App developer

New member | Level 2

Greg K.,

Thanks for your quick reply. I used the check function to evaluate the status of the job. Sometimes, it states "Complete", but then in the tag, it issues "Failure" in the target folder. I don't know what it means since I clearly indicated the origin and target folders. 

Thanks,

Highlighted

Re: App developer

New member | Level 2

Following is the error I received after the status came "Complete":

Error.entries.failure.relocation_error.to.conflict.folder

It means the conflict in the folder, would you please elaborate this error?

Thanks

 

Highlighted

Re: App developer

Dropboxer

You can check what the specific returned error means in the documentation:

https://www.dropbox.com/developers/documentation/http/documentation#files-copy_batch-check

For instance, click on 'RelocationBatchV2Result', and so on, to drill down to the relevant error. 

In this case, for 'Error.entries.failure.relocation_error.to.conflict.folder', that means "Couldn't write to the target path because there was something in the way.", and specifically, "There's a folder in the way.".

That is to say, the copy failed because there was already a folder at the "to_path" you specified as the destination for the copy operation. 

Are you trying to copy the item into the folder you specified? Note that when configuring the copy job, you should specify the full path where you want to put the copy, not just the parent folder. For example, to copy a file named "test.txt" into an existing folder named "Folder", the "to_path" would be "/Folder/test.txt", not just "/Folder".

View solution in original post

Highlighted

Re: App developer

New member | Level 2

Thanks for your reply. I didn't add the file name to to_path. That might be the issue. 

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?