You are here

public function Grants::delete in Auth0 Single Sign On 8.2

Delete a grant by Grant ID or User ID. Required scope: "delete:grants"

@link https://auth0.com/docs/api/management/v2#!/Grants/delete_grants_by_id

Parameters

string $id Grant ID to delete a single Grant or User ID to delete all Grants for a User.:

Return value

mixed

Throws

CoreException If $id is empty or not a string.

\Exception Thrown by the HTTP client when there is a problem with the API call.

File

vendor/auth0/auth0-php/src/API/Management/Grants.php, line 128

Class

Grants
Class Grants

Namespace

Auth0\SDK\API\Management

Code

public function delete($id) {
  if (empty($id) || !is_string($id)) {
    throw new CoreException('Empty or invalid "id" parameter.');
  }
  return $this->apiClient
    ->method('delete')
    ->addPath('grants', $id)
    ->call();
}