You are here

public function ResourceServers::get in Auth0 Single Sign On 8.2

Get a single Resource Server by ID or API identifier. Required scope: "read:resource_servers"

@link https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource...

Parameters

string $id Resource Server ID or identifier to get.:

Return value

mixed

Throws

CoreException Thrown if the id parameter is empty or is 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/ResourceServers.php, line 60

Class

ResourceServers
Class ResourceServers. Handles requests to the Resource Servers endpoint of the v2 Management API.

Namespace

Auth0\SDK\API\Management

Code

public function get($id) {
  if (empty($id) || !is_string($id)) {
    throw new CoreException('Invalid "id" parameter.');
  }
  return $this->apiClient
    ->method('get')
    ->addPath('resource-servers', $id)
    ->call();
}