src/User.php
public function register($email, $cellphone, $countryCode, $sendInstallLink = true): Response
    {
        // Prepare required variables
        $url = $this->api.'users/new';
        $params = $this->params + [
            'form_params' => [
                'send_install_link_via_sms' => (bool) $sendInstallLink,
                'user' => [
                    'email' => $email,
                    'cellphone' => preg_replace('/[^0-9]/', '', $cellphone),
                    'country_code' => $countryCode,
                ],
            ],
        ];

        // Register Authy user, and return response
        return new Response($this->http->post($url, $params));
    }
public function register($email, $cellphone, $countryCode, $sendInstallLink = true): Response
    {
        // Prepare required variables
        $url = $this->api.'users/new';
        $params = $this->params + [
            'form_params' => [
                'send_install_link_via_sms' => (bool) $sendInstallLink,
                'user' => [
                    'email' => $email,
                    'cellphone' => preg_replace('/[^0-9]/', '', $cellphone),
                    'country_code' => $countryCode,
                ],
            ],
        ];

        // Register Authy user, and return response
        return new Response($this->http->post($url, $params));
    }
public function register ( $ email , $ cellphone , $ countryCode , $ sendInstallLink = true ) : Response { // Prepare required variables $ url = $ this -> api . 'users/new' ; $ params = $ this -> params + [ 'form_params' => [ 'send_install_link_via_sms' => ( bool ) $ sendInstallLink , 'user' => [ 'email' => $ email , 'cellphone' => preg_replace ( '/[^0-9]/' , '' , $ cellphone ) , 'country_code' => $ countryCode , ] , ] , ] ; // Register Authy user, and return response return new Response ( $ this -> http -> post ( $ url , $ params ) ) ; }
Register a new Authy user.

@param string $email
@param string $cellphone
@param string $countryCode
@param bool   $sendInstallLink

@return \Rinvex\Authy\Response
Register a new Authy user .