You are here

public function Users::unlinkAccount in Auth0 Single Sign On 8.2

Unlink an identity from the target user. Required scope: "update:users"

@link https://auth0.com/docs/api/management/v2#!/Users/delete_user_identity_by...

Parameters

string $user_id User ID to unlink.:

string $provider Identity provider of the secondary linked account.:

string $identity_id The unique identifier of the secondary linked account.:

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/Users.php, line 210

Class

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

Namespace

Auth0\SDK\API\Management

Code

public function unlinkAccount($user_id, $provider, $identity_id) {
  return $this->apiClient
    ->method('delete')
    ->addPath('users', $user_id)
    ->addPath('identities', $provider)
    ->addPath($identity_id)
    ->call();
}