You are here

public function ClientGrants::getByAudience in Auth0 Single Sign On 8.2

Get Client Grants by audience. Required scope: "read:client_grants"

@link https://auth0.com/docs/api/management/v2#!/Client_Grants/get_client_grants

Parameters

string $audience API Audience to filter by.:

null|integer $page The page number, zero based.:

null|integer $per_page The amount of entries per page.:

Return value

mixed

Throws

CoreException Thrown when $audience 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/ClientGrants.php, line 64

Class

ClientGrants
Class ClientGrants. Handles requests to the Client Grants endpoint of the v2 Management API.

Namespace

Auth0\SDK\API\Management

Code

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