public function Grants::getByAudience in Auth0 Single Sign On 8.2
Get Grants by Audience with pagination. Required scope: "read:grants"
@link https://auth0.com/docs/api/management/v2#!/Grants/get_grants
Parameters
string $audience Audience 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 $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/ Grants.php, line 82
Class
- Grants
- Class Grants
Namespace
Auth0\SDK\API\ManagementCode
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($page, $per_page, [
'audience' => $audience,
]);
}