我在应用程序中集成了Sinch验证
Config config = SinchVerification.config().applicationKey(APP_KEY).context(getApplicationContext()).build();
Verification verification = SinchVerification.createSmsVerification(config, "phone number", listener);
verification.initiate();
但是它总是显示无效的回调响应。错误。
com.sinch.verification.ServiceErrorException: Sinch backend request failed with code: 42202 message: Invalid callback response.
at com.sinch.verification.internal.apiservice.ApiService.extractError(ApiService.java:95)
at com.sinch.verification.internal.apiservice.ApiService.handleResponse(ApiService.java:81)
at com.sinch.verification.internal.apiservice.ApiService.access$000(ApiService.java:13)
at com.sinch.verification.internal.apiservice.ApiService$1.onSuccess(ApiService.java:42)
我已经在开发人员站点的sinch应用程序中输入了回调URL。
最佳答案
如果您配置了回叫,则需要以正确的格式进行回复,即
内容类型:application / json
{
"action": "allow"
}
如果您不希望回调,只需将其删除。 https://www.sinch.com/docs/verification/rest/#verificationcallbackapi
关于android - Sinch验证错误42202,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36305982/