Skip to content

WhatsApp API getPhone

CodingMakeWordBetter edited this page Jun 14, 2023 · 9 revisions

Query Number Information

Query WhatsApp number information through API

  • URL: https://api2.nxcloud.com/api/wa/getPhone
  • Method: POST
  • Content-Type: application/json
  • Authentication Required: Yes

Authentication Mechanism

Please refer to the following address for authentication rules: API Interface Call Convention

Request Parameters

Header Parameters:

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

Body Parameters:

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 whatsapp Channel for sending messages. When sending WhatsApp messages, the value must be "whatsapp"

Request Example

Body (application/json) parameters:

{
    "business_phones": "185xxx99,861xxx24",
    "appkey": "jh42xxxd434",
    "messaging_product": "whatsapp"
}

Response Parameters

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

Response Example

Success Example

{
    "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"
}

Failure 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 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

WhatsApp

Short message

Voice

Call Center(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally