Authy PHP-未正确传递用户参数

Authy PHP-未正确传递用户参数,php,curl,authy,Php,Curl,Authy,我使用的是Authy-PHP包装器(Authy-PHP),但是当我创建一个新用户时,我得到了 您没有正确地传递用户参数 require(“./vendor/autoload.php”); $authy_api=new authy\AuthyApi('My api Key here'); $user=$authy_api->registerUser('g*********@*********.co.uk','7***-9**-9**','44'); 如果($user->ok()){ 打印“”; 打

我使用的是Authy-PHP包装器(Authy-PHP),但是当我创建一个新用户时,我得到了

您没有正确地传递用户参数

require(“./vendor/autoload.php”);
$authy_api=new authy\AuthyApi('My api Key here');
$user=$authy_api->registerUser('g*********@*********.co.uk','7***-9**-9**','44');
如果($user->ok()){
打印“”;
打印(用户);
打印“”;
}否则{
foreach($user->errors()作为$field=>$message){
printf(“$field=$message”);
}
}

发现了问题,为了阻止本地主机SSL破坏我的脚本,我停止了ip解析。但把它放回去,它就成功了

我觉得自己很愚蠢


对于在localhost上测试Authy的人,只需在AuthyApi.php上的Guzzle HTTP的默认值上粘贴verify=false即可。

尝试使“44”与“44”相同,但会出现相同的错误。我所做的唯一其他更改是在我现在从localhost运行时将“'verify'=>false”添加到GuzzleHTTP选项。您的电话号码格式正确吗?尝试使用/不使用前导零。尝试使用破折号/不使用破折号。
require("./vendor/autoload.php");
$authy_api = new Authy\AuthyApi('My API Key here');
$user = $authy_api->registerUser('g.******@*****.co.uk', '7***-9**-9**', '44');
if($user->ok()){
    print "<pre>";
    print_r($user);
    print "</pre>";
}else{
   foreach($user->errors() as $field => $message) {
      printf("$field = $message");
   }
}