首页 帮助中心 API

校验验证码

说明: 通过接口校验指定消息id验证码是否正确。

请求参数说明:

参数 说明 是否必填 类型

verificationId

消息id

String

code

验证码,4-10字符

String

请求URL:

                                
                                  https://api.onbuka.com/v3/otp/verification/verify
                                
                            

请求示例:

                                                
                                                    Request URL:
                                                        https://api.onbuka.com/v3/otp/verification/verify
                                                    Request Method:
                                                        POST
                                                    Request Headers:
                                                        Content-Type: application/json;charset=UTF-8
                                                        Sign: 05d7a50893e22a5c4bb3216ae3396c7c
                                                        Timestamp: 1630468800
                                                        Api-Key: bDqJFiq9
                                                    Request Body:
                                                        {
                                                            "verificationId":"22206051443051000003",
                                                            "code":"5863"
                                                    }
                                                
                            

响应参数说明:

参数 说明 类型

status

状态码,0成功,其他失败参见状态码说明

String

reason

失败原因说明

String

data

响应参数详情

JSONObject

   verificationId

消息id

String

   to

接收号码

String

   channel

通道类型 [sms, call, sna]

String

   matched

验证码的检验结果[-1未校验、 0校验成功、1发送中、2校验失败、3不存在的verificationId、4已使用的verificationId、5验证码超时 ]

Int

响应示例:

                                                
                                                    {
                                                        "status": "0",
                                                        "reason": "success",
                                                        "data": {
                                                            "verificationId": "22206051443051000003",
                                                            "to": "8613500000000",
                                                            "channel": "sms",
                                                            "matched": 0
                                                        }
                                                    }
                                                
                            
 

上一篇: 重发验证码

意见反馈

0/500