Closed lubwen closed 5 years ago
Hi,
After I create a user using the API, e.g.: $user = $authy_api->registerUser('email', 'xxx-xxx-xxxx', '1');
How could I get the 'authy-id' from the return $user object?
The command print_r($user) shows that it is a 'protected' field so I guess there is a function like 'getID' or something to retrieve the 'authy-id'?
Authy\AuthyUser Object ( [raw_response:protected] => GuzzleHttp\Psr7\Response Object ( +-- 78 lines------------------------------------------------------- )
[body:protected] => stdClass Object ( [id] => 15xxxxxx0 ) [errors:protected] => stdClass Object ( )
)
Please advise. Thanks. Best regards,
I found the answer to my own question. Below is the function if anybody wants it: echo ( $user->bodyvar('id') );
Hi,
After I create a user using the API, e.g.: $user = $authy_api->registerUser('email', 'xxx-xxx-xxxx', '1');
How could I get the 'authy-id' from the return $user object?
The command print_r($user) shows that it is a 'protected' field so I guess there is a function like 'getID' or something to retrieve the 'authy-id'?
Authy\AuthyUser Object ( [raw_response:protected] => GuzzleHttp\Psr7\Response Object ( +-- 78 lines------------------------------------------------------- )
)
Please advise. Thanks. Best regards,