forked from nxtele/http-api-document
-
Notifications
You must be signed in to change notification settings - Fork 1
WhatsApp API getPhone
CodingMakeWordBetter edited this page Jun 14, 2023
·
9 revisions
Query WhatsApp number information through API
- URL:
https://api2.nxcloud.com/api/wa/getPhone - Method:
POST - Content-Type:
application/json - Authentication Required: Yes
Please refer to the following address for authentication rules: API Interface Call Convention
| Parameter Name | Type | Required | Example Value | Description |
|---|---|---|---|---|
| accessKey | String | Yes | fmexxx3ki | User identity identifier |
| ts | String | Yes | 1655710885431 | Timestamp of the current request (in milliseconds). The maximum time difference allowed between the user and the NxCloud server is 60 seconds. |
| bizType | String | Yes | 2 | WhatsApp business type, fixed value "2" |
| action | String | Yes | getPhone | WhatsApp business operation, fixed value "getPhone" |
| sign | String | Yes | 6e95xxx826 | API input parameter signature, signature algorithm |
| Parameter Name | Type | Required | Example Value | Description |
|---|---|---|---|---|
| appkey | String | Yes | App key for the NxCloud WhatsApp application | |
| business_phones | String | Yes | 86158xxx1795 | List of merchant's WhatsApp numbers, including country code. Multiple numbers should be separated by ", ". For example: 185xxx99,861xxx24 |
| messaging_product | String | Yes | Channel for sending messages. When sending WhatsApp messages, the value must be "whatsapp" |
Body (application/json) parameters:
{
"business_phones": "185xxx99,861xxx24",
"appkey": "jh42xxxd434",
"messaging_product": "whatsapp"
}| Parameter Name | Type | Description |
|---|---|---|
| code | Integer | Result code |
| data | JsonObject | Request result |
| message | String | Description of the request result |
- data object parameters:
| Parameter Name | Type | Description |
|---|---|---|
| business_phones | array[business_phone object] | Sequence of number information. For a response message with only one number, it contains one phone object. |
- business_phone object parameters:
| Parameter Name | Type | Description |
|---|---|---|
| display_phone_number | string | Registered WhatsApp number |
| quality_rating | string | Quality rating of the number. Enum values: GREEN: High quality; YELLOW: Medium quality; RED: Low quality; UNKNOW: Quality unknown |
| verified_name | string | Display name of the number |
| name_status | string | Name approval status. Enum values: APPROVED: The name has not been approved yet. NONE: No available certificate. AVAILABLE_WITHOUT_REVIEW: The certificate for downloading the phone number is available without review. DECLINED: The name has not been approved. You cannot download the certificate. EXPIRED: Your certificate has expired and cannot be downloaded. PENDING_REVIEW: Your name request is under review. You cannot download the certificate. |
| status | string | Number status. Enum values: PENDING, DELETED, MIGRATED, BANNED, RESTRICTED, RATE_LIMITED, FLAGGED, CONNECTED, DISCONNECTED, UNKNOWN, UNVERIFIED |
| current_limit | string | 24-hour limit level for initiating merchant conversations. Enum values: TIER_1K: 1,000 customers/24 hours; TIER_10K: 10,000 customers/24 hours; TIER_100K: 100,000 customers/24 hours; TIER_50: 50 customers/24 hours; TIER_250: 250 customers/24 hours; TIER_UNLIMITED: Not applicable |
| code_verification_status | string | Number verification status. Enum values: NOT_VERIFIED: Not verified; VERIFIED: Verified |
{
"code": 0,
"data": {
"86xxx24": [
{
"display_phone_number": "+86 xxx 24",
"quality_rating": "GREEN",
"name_status": "APPROVED",
"verified_name": "GLORY JACK",
"code_verification_status": "VERIFIED",
"current_limit": "",
"status": "CONNECTED"
}
],
"1xxx99": [
{
"display_phone_number": "+1 xxx99",
"quality_rating": "GREEN",
"name_status": "APPROVED",
"verified_name": "Glory HK",
"code_verification_status": "NOT_VERIFIED",
"current_limit": "",
"status": "CONNECTED"
}
]
},
"message": "Request successful"
}{
"code": -1,
"message": "Request failed",
"data": null
}| code | message | Solution |
|---|---|---|
| 0 | Request successful | |
| -1 | Request failed | Please contact technical support to troubleshoot the issue. |
| 1000~100X | Authentication issue | See the API authentication section for details. |
| 9000 | Parameter exception | Required parameters are missing. Please check the necessary parameters. |
| 9001 | System business error | Please contact technical support to troubleshoot the issue. |
| 9002 | Merchant phone number error | Please confirm whether the merchant number belongs to a WhatsApp number. |
| 9006 | The WhatsApp number is not bound to an application | Please contact the business personnel to handle the binding operation between the application and the phone number. |
Introduction
- Send Message
- Mark Incoming Message as Read
- Upload Media File
- Get Media File
- Delete Media File
- Webhook
- Query Number Information
- Query Message Template
- Create Message Template
- Edit Message Template
- Delete Message Template
- Upload Template Example File
- Embedded Page Login
- Create Client Application
- List of Phone Numbers for Client Application
- Get Verification Code
- Verify Verification Code
- Create Local Client
Short message
Voice
Call Center(NXLink)
- Web Iframe
- Manual Dial Record
- Manual Dial Record Query By orderId
- List Agent Information
- List Agent Status
- List Queue
- List Agents In Queue
- List Agent Efficiency
- Update Queue Agents
- Create AutoDial Task
- Webhook - Manual Dial
Call Center(Callbot)
- Callbot API Summary
- Callbot API Authorization
- Callbot API Ping
- Create Auto Dial Task
- Add Contact List To Task
- Create Task And Add Contact
- Start Or Pause Task
- Update Task Parameters
- Get List Task
- List Call
- List Task Orders
- Stop Order
- Get Call Detail By Order
- Webhook - By Call
- Webhook - By Order
- Webhook - Task Status
Flash Call
Short links
邮件验证码
DID号码
通用
号码检测