【发布时间】:2020-04-16 20:49:54
【问题描述】:
我将 Auth0.AuthenticationApi 用于无密码。我已经使用 Twilio 试用帐户设置了我的客户并填充了 SID 和 AuthToken 的实时凭据。当我拨打StartPasswordlessSmsFlowAsync 时,我收到一条关于“收件人”电话号码格式的错误消息。我已尝试按照另一篇文章中的建议对电话号码进行 URL 编码。
参见下面的代码。
PasswordlessSmsRequest request = new PasswordlessSmsRequest();
request.ClientId = "D2E7BMKdT6q6fBLi*****************";
request.PhoneNumber = System.Net.WebUtility.UrlEncode(phoneNumber); // +353123456789
var response = client.StartPasswordlessSmsFlowAsync(request);
这会导致错误 21211:
String does not match pattern: ^\+[0-9]{1,15}$
我也尝试使用无密码连接下的“尝试”功能,但出现了同样的错误。
有人可以帮忙吗?
【问题讨论】: