src/whatsprot.class.php
public function sendSetRecoveryToken($token)
    {
        $child = new ProtocolNode('pin',
            [
                'xmlns' => 'w:ch:p',
            ], null, $token);

        $node = new ProtocolNode('iq',
            [
                'id'   => $this->createIqId(),
                'type' => 'set',
                'to'   => Constants::WHATSAPP_SERVER,
            ], [$child], null);

        $this->sendNode($node);
    }
public function sendSetRecoveryToken($token)
    {
        $child = new ProtocolNode('pin',
            [
                'xmlns' => 'w:ch:p',
            ], null, $token);

        $node = new ProtocolNode('iq',
            [
                'id'   => $this->createIqId(),
                'type' => 'set',
                'to'   => Constants::WHATSAPP_SERVER,
            ], [$child], null);

        $this->sendNode($node);
    }
public function sendSetRecoveryToken ( $ token ) { $ child = new ProtocolNode ( 'pin' , [ 'xmlns' => 'w:ch:p' , ] , null , $ token ) ; $ node = new ProtocolNode ( 'iq' , [ 'id' => $ this -> createIqId ( ) , 'type' => 'set' , 'to' => Constants :: WHATSAPP_SERVER , ] , [ $ child ] , null ) ; $ this -> sendNode ( $ node ) ; }
Set the recovery token for your account to allow you to retrieve your password at a later stage.

@param string $token A user generated token.
Set the recovery token for your account to allow you to retrieve your password at a later stage .