Twilio Verify API 验证调用 return curl 错误
Twilio Verify API verification call return curl error
我现在正在试用 Twilio Verify API 并且指南实际上显示只有两次调用 API 将 OTP 发送到目标 phone 号码并检查最终用户输入的 OTP 是否正确。我的验证码部分有问题,return 卷曲错误。
OTP 已成功发送至目标phone。
这是我用来检查 OTP 的 curl 命令:
curl -GET 'https://api.authy.com/protected/json/phones/verification/check' -d api_key=xxxx -d verification_code=xxxx-d phone_number=xx-d country_code=xx
这是错误信息:
curl: (58) could not load PEM client certificate, OpenSSL error error:02001002:system library:fopen:No such file or directory, (no key found, wrong pass phrase, or wrong file format?)
抱歉没有正确阅读错误消息,我已经通过将服务器的 SSL 证书路径和私钥路径添加到 curl 命令来修复它并且它有效。
curl -GET 'https://api.authy.com/protected/json/phones/verification/check' -d api_key=xxxx -d verification_code=xxxx-d phone_number=xx-d country_code=xx --cert path/to/fullchain.pem --key path/to/privkey.pem
我现在正在试用 Twilio Verify API 并且指南实际上显示只有两次调用 API 将 OTP 发送到目标 phone 号码并检查最终用户输入的 OTP 是否正确。我的验证码部分有问题,return 卷曲错误。
OTP 已成功发送至目标phone。
这是我用来检查 OTP 的 curl 命令:
curl -GET 'https://api.authy.com/protected/json/phones/verification/check' -d api_key=xxxx -d verification_code=xxxx-d phone_number=xx-d country_code=xx
这是错误信息:
curl: (58) could not load PEM client certificate, OpenSSL error error:02001002:system library:fopen:No such file or directory, (no key found, wrong pass phrase, or wrong file format?)
抱歉没有正确阅读错误消息,我已经通过将服务器的 SSL 证书路径和私钥路径添加到 curl 命令来修复它并且它有效。
curl -GET 'https://api.authy.com/protected/json/phones/verification/check' -d api_key=xxxx -d verification_code=xxxx-d phone_number=xx-d country_code=xx --cert path/to/fullchain.pem --key path/to/privkey.pem