access.revoke(slug: string, memberId: string, options?: RequestScope): Promise<RevokedProductAccessResource>Removes a member grant from a product. A missing grant is not an error: the call still resolves, with revoked: false, so read that flag instead of treating a successful call as proof that something was removed.
Revoking the membership belonging to the key owner is refused, and that guard is what stops an integration locking itself out of a private product. Revoking on a public product deletes the stored row and changes nothing about who can read the product.
Example
const result = await envless.products.access.revoke('billing', '8f1c0e42-9b7a-4d21-9d0e-3a41c7f5b210')
if (!result.revoked) {
console.log('that member had no grant on the product')
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Product slug, or the product uniqueId when the value is UUID shaped. |
memberId | string | Yes | Workspace member id whose grant is being removed, never a user id. |
options.signal | AbortSignal | No | Cancels the request. |
Returns
RevokedProductAccessResource with the member id and a revoked flag.
Worth knowing
- The call is idempotent, so running it twice is safe and the second run resolves
revoked: false. - An unknown member id is still rejected, so
revoked: falseonly ever means the member existed without a grant.
Required scopes
product-access:write
Underlying endpoint
DELETE /products/{slug}/access/{memberId}
Request and response schema, every error code, and a live playground.
In Python
envless.products.access.revoke()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.products.access.revoke
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->products->access->revoke()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.