首页 帮助中心 API

发送验证码

说明: 通过接口发送短信验证码。

请求参数说明:

参数 说明 是否必填 类型

appId

应用id,4-32字符

String

templateId

模板id

Int

flowId

任务流ID

Int

to

接收号码,国码+手机号组成的10-14位数字组成字符。

String

channel

通道类型 [sms, call, sna], 默认sms

String

orderId

第三方平台流水号,需全局唯一,0-64字符

String

请求URL:

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

请求示例:

                                                
                                                    Request URL:
                                                        https://api.onbuka.com/v3/otp/verification/send
                                                    Request Method:
                                                        POST
                                                    Request Headers:
                                                        Content-Type: application/json;charset=UTF-8
                                                        Sign: 05d7a50893e22a5c4bb3216ae3396c7c
                                                        Timestamp: 1630468800
                                                        Api-Key: bDqJFiq9
                                                    Request Body:
                                                        {
                                                            "appId":"mRELxtHc",
                                                            "templateId":1,
                                                            "flowId":null,
                                                            "to":"91856321412",
                                                            "channel":"sms",
                                                            "orderId":null
                                                        }
                                                
                            

响应参数说明:

参数 说明 类型

status

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

String

reason

失败原因说明

String

data

响应参数详情

JSONObject

   verificationId

消息id

String

   to

接收号码

String

   channel

通道类型 [sms, call, sna]

String

   snaUrl

channel为SNA时返回

String

响应示例:

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

意见反馈

0/500