Integrate file protection into your application
DGR uses API keys for authentication. Get your API key from the dashboard after creating an account.
dgr.protect(options)
Upload and protect a file
File content to upload
Original file name with extension
Maximum allowed unauthorized downloads
Percentage degradation per unauthorized copy
Text to embed in degraded copies
dgr.download(fileId)
Download file as owner (returns original)
File ID returned from protect()
dgr.getShareLink(shareToken)
Generate public download URL
dgr.list()
List all protected files for authenticated user
dgr.delete(fileId)
Permanently delete a file and all copies
/api/files/upload
Upload and protect a file
/api/files/download/:fileId
Download file as owner (authenticated)
/api/files
List all files for authenticated user
/api/files/:fileId
Permanently delete file and all copies