cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Delete a file using Java api v2

Delete a file using Java api v2

Dan R.23
New member | Level 1
Go to solution

How do I delete a file using the java api v2.  I found DeleteArg, but it doesn't seem to do any thing???  Thanks.

12 Replies 12

cgirecruitment1
Explorer | Level 4
Go to solution

Yes. My code looks like this:

public String deleteFile(String path)
throws DbxException {

DbxRequestConfig requestConfig = DbxRequestConfig.newBuilder("Dropbox Documents Delete").build();
DbxClientV2 client = new DbxClientV2(requestConfig, "AccessToken");

 

FileMetadata fileMetadata = (FileMetadata) client.files().delete(path);
return fileMetadata.getId();
}

 

Path Parameter:  id:MWWBdvN6DaAAAAAAAAAAwA

cgirecruitment1
Explorer | Level 4
Go to solution
The Error: String 'path' does not match pattern

Greg-DB
Dropbox Staff
Go to solution
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    cgirecruitment1 Explorer | Level 4
What do Dropbox user levels mean?