You are here

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

Get Grants by Client ID with pagination. Required scope: "read:grants"

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

Parameters

string $client_id Client ID to filter Grants.:

integer $page Page number to return, zero-based.:

null|integer $per_page Number of results per page, null to return all.:

Return value

mixed

Throws

CoreException If $client_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 58

Class

Grants
Class Grants

Namespace

Auth0\SDK\API\Management

Code

public function getByClientId($client_id, $page = 0, $per_page = null) {
  if (empty($client_id) || !is_string($client_id)) {
    throw new CoreException('Empty or invalid "client_id" parameter.');
  }
  return $this
    ->getAll($page, $per_page, [
    'client_id' => $client_id,
  ]);
}