Skip to main content

Revoke file access

In this tutorial you will learn how to use Arcana Storage SDK and revoke file access for a file that was earlier uploaded to Arcana Store and shared by the current dApp user.


  • Make sure your dApp is integrated with Arcana Storage SDK
  • You need to have access to the target user's wallet address for authenticating and revoking file sharing permissions
  • The DID of the file is required in order to revoke access and identify it uniquely on the Arcana Store
  • The code in the steps section below refers to StorageProvider and Access objects initialized during Storage SDK integration:
import { StorageProvider } from '@arcana/storage/dist/standalone/storage.umd';

dAppStorageProvider = new StorageProvider({
provider: window.ethereum,
email: user_email_string,

const Access = new dAppStorageProvider.getAccess();

Revoke file access

// did: DID of file from which access is removed
// address: Address of the user who's access is getting revoked
Access.revoke(did, address);

What's Next?

You can also change file ownership using Storage SDK.

If you are using Storage SDK with a third party wallet, you can also consider integrating with Arcana Auth SDK to ensure the privacy of your data by encrypting data before uploading and decrypting data after download.

See also