Number with WhatsApp ?
#
Method#
/phone-existsGET
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/phone-exists
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThis method returns whether or not the number has WhatsApp.
Important
Z-API is not designed to spread spam to contacts you don't know, however we recommend that if you are not sure whether the number you are going to send messages to has WhatsApp you can and should use this method to make sure.
#
Attributes#
RequiredAttributes | Type | Description |
---|---|---|
phone | string | Telephone number in the format DDI DDD NUMERS Ex: 551199999999. IMPORTANT only send numbers without formatting or a mask |
#
OptionalsAttributes | Type | Description |
---|---|---|
#
Request Params#
URL exampleMethod
GET
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/phone-exists/5511999999999
#
Response#
200Attributes | Type | Description |
---|---|---|
exists | boolean | True for if it exists and false for cases where the number does not have WhatsApp |
Example
#
405In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.
#
415In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”