WhatsApp API getCode - nxtele/nxcloud-doc-en GitHub Wiki
Integrator: Get Verification Code
Initiate the service to get a verification code through the API (for integrators only).
- URL:
https://api2.nxcloud.com/api/wa/integrator/embedded/register/getCode
- Method:
POST
- Content-Type:
application/json
- Requires authentication: Yes
Authentication Mechanism
Please refer to the following link for authentication rules: API Interface Call Convention
Request Parameters
Header Parameters:
Parameter Name |
Type |
Required |
Example |
Description |
accessKey |
String |
Yes |
fme2na3kdi3ki |
User identity identifier |
ts |
String |
Yes |
1655710885431 |
Current timestamp of the request (in milliseconds). The maximum allowed time difference is 60 seconds on the server side. |
bizType |
String |
Yes |
2 |
WhatsApp business type, fixed value "2" |
action |
String |
Yes |
getCode |
WhatsApp business operation, fixed value "getCode" |
sign |
String |
Yes |
6e9506557d1f289501d333ee2c365826 |
API input parameter signature, signature algorithm |
Body Parameters:
Parameter Name |
Type |
Required |
Example |
Description |
phone_number |
String |
Yes |
185xxx99 |
Phone number |
method |
String |
Yes |
sms |
Enumeration value: sms, voice |
Request Example
Body (application/json) parameters:
{
"phone_number": "185xxx99",
"method": "sms"
}
Response Parameters
Parameter Name |
Type |
Description |
code |
Integer |
Result code |
data |
JsonObject |
Request result |
message |
String |
Request result description |
Response Example
Successful Example
{
"code": 0,
"data": {},
"message": "Request successful"
}
Failed Example
{
"code": -1,
"message": "Request failed",
"data": null
}
Response Code Explanation
code |
message |
Solution |
0 |
Request successful |
|
-1 |
Request failed |
Please contact technical support to troubleshoot the issue |
1000~100X |
Authentication issue |
Refer to the API authentication section for details |
9000 |
Parameter exception |
Missing parameters, please check the required parameters |
9001 |
System business error |
Please contact technical support to troubleshoot the issue |
9007 |
Non-integrator request |
Please confirm if you are an integrator |