public function requestCode($username, $type = 'sms', $debug = false)
	{
		// Create a instance of Registration class.
		$registration = new Registration($username, $debug);

		switch ($type) {
			case 'sms':
				$registration->codeRequest('sms');
				break;
			case 'voice':
				$registration->codeRequest('voice');
				break;
			default:
				throw new Exception('Invalid registration type');
		}
		return $registration;
	}
public function requestCode($username, $type = 'sms', $debug = false)
	{
		// Create a instance of Registration class.
		$registration = new Registration($username, $debug);

		switch ($type) {
			case 'sms':
				$registration->codeRequest('sms');
				break;
			case 'voice':
				$registration->codeRequest('voice');
				break;
			default:
				throw new Exception('Invalid registration type');
		}
		return $registration;
	}
public function requestCode ( $ username , $ type = 'sms' , $ debug = false ) { // Create a instance of Registration class.
 $ registration = new Registration ( $ username , $ debug ) ; switch ( $ type ) { case 'sms' : $ registration -> codeRequest ( 'sms' ) ; break ; case 'voice' : $ registration -> codeRequest ( 'voice' ) ; break ; default : throw new Exception ( 'Invalid registration type' ) ; } return $ registration ; }
When requesting the code, you can do it via SMS or voice call, in both cases you
will receive a code like 123-456, that we will use for register the number.

@param string $username Your phone number with country code, ie: 34123456789
@param string $type
@param bool $debug Shows debug log, this is set to false if not specified
@return Registration
@throws Exception
@internal param string $nickname Your nickname, it will appear in push notifications
@internal param bool $log Enables log file, this is set to false if not specified
When requesting the code you can do it via SMS or voice call in both cases you will receive a code like 123 - 456 that we will use for register the number .