You are here

public function Tickets::createEmailVerificationTicket in Auth0 Single Sign On 8.2

Parameters

string $user_id:

null|string $result_url:

Return value

mixed

File

vendor/auth0/auth0-php/src/API/Management/Tickets.php, line 13

Class

Tickets

Namespace

Auth0\SDK\API\Management

Code

public function createEmailVerificationTicket($user_id, $result_url = null) {
  $body = [
    'user_id' => $user_id,
  ];
  if ($result_url !== null) {
    $body['result_url'] = $result_url;
  }
  $request = $this->apiClient
    ->method('post')
    ->addPath('tickets')
    ->addPath('email-verification')
    ->withBody(json_encode($body));
  return $request
    ->call();
}