You are here

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

Get a single Connection by ID. Required scope: "read:connections"

@link https://auth0.com/docs/api/management/v2#!/Connections/get_connections_b...

Parameters

string $id Connection ID to get.:

null|string|array $fields Fields to include or exclude from the result.:

  • Including only the fields required can speed up API calls significantly.
  • Arrays will be converted to comma-separated strings.

null|boolean $include_fields True to include $fields, false to exclude $fields.:

Return value

mixed|string

Throws

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

File

vendor/auth0/auth0-php/src/API/Management/Connections.php, line 87

Class

Connections
Class Connections. Handles requests to the Connections endpoint of the v2 Management API.

Namespace

Auth0\SDK\API\Management

Code

public function get($id, $fields = null, $include_fields = null) {
  $params = [];

  // Results fields.
  if (!empty($fields)) {
    $params['fields'] = is_array($fields) ? implode(',', $fields) : $fields;
    if (null !== $include_fields) {
      $params['include_fields'] = $include_fields;
    }
  }
  return $this->apiClient
    ->method('get')
    ->addPath('connections', $id)
    ->withDictParams($params)
    ->call();
}