id<SINVerification> verification =
[SINVerification SMSVerificationWithApplicationKey:SINCH_Key phoneNumber:phoneNumber];
[verification initiateWithCompletionHandler:^(BOOL success, NSError *error) {
if (success) {
NSLog(@"sucess");
} else {
NSLog(@"error : %@", error.description);
}
}];
这是错误消息:
错误域= SINVerificationErrorDomain代码= 3&#34;错误域= SINVerificationServiceErrorDomain代码= 403&#34;错误域= SINVerificationServiceErrorDomain代码= 40303&#34;未满足授权要求。&#34; UserInfo = 0x7f838254a420 {NSLocalizedDescription =未达到授权要求。}&#34; UserInfo = 0x7f8382550270 {NSLocalizedDescription = Error Domain = SINVerificationServiceErrorDomain Code = 40303&#34;未满足授权要求。&#34; UserInfo = 0x7f838254a420 {NSLocalizedDescription =未满足授权要求。},NSUnderlyingError = 0x7f838253c240&#34;未满足授权要求。&#34;}&#34; UserInfo = 0x7f83824a7a40 {NSLocalizedDescription =错误域= SINVerificationServiceErrorDomain代码= 403&#34;错误域= SINVerificationServiceErrorDomain代码= 40303&#34;未满足授权要求。&#34; UserInfo = 0x7f838254a420 {NSLocalizedDescription =未达到授权要求。}&#34; UserInfo = 0x7f8382550270 {NSLocalizedDescription = Error Domain = SINVerificationServiceErrorDomain Code = 40303&#34;未满足授权要求。&#34; UserInfo = 0x7f838254a420 {NSLocalizedDescription =未满足授权要求。},NSUnderlyingError = 0x7f838253c240&#34;未满足授权要求。&#34;},NSUnderlyingError = 0x7f8382556cc0&#34;错误域= SINVerificationServiceErrorDomain代码= 40303&#34;授权要求未得到满足。&#34; UserInfo = 0x7f838254a420 {NSLocalizedDescription =未达到授权要求。}&#34;}
我确定我的电话号码和应用密钥是正确的。我试图将dashboard->verification
设置为公开和应用但没有运气。有什么想法吗?
答案 0 :(得分:6)
我通过转到Sinch仪表板修复了这个问题 - &gt;选择您的应用 - &gt;在验证下,将授权从APPLICATION更改为PUBLIC。