You can revoke permissions with the grant API setting the read and write parameter to false. Some SDKs also provide a convenient revoke API.