Request Phone
You can use the "Request Phone" API in one case only: You reply to a message that the client sent, within 24 hours since the client sent his last message.
Explanation
Requesting a phone is used only when the client is using the "username" feature, and hides his phone number on WhatsApp. when a client is hiding his phone number and his name, you can use this request phone to ask the client to reveal his phone number to you.
The user will get a message with a button. the button (which you can't control the text of it) will be asked if he wants to reveal his phone number and name for you. after the client confirm and click the button, the new phone number data will be sent as a "phone" type inside the webhook.
Remarks
You can use the "Request Phone" API in one case only - for reply to a message that the client sent, within 24 hours since the client sent his last message.
The billing is per message. when sending this message you will be billed.
Every time the user replies, the template message session resets. which means that you don't have to use template message during this 24 hours template message session.
Settings:
URL | |||||
Method | JSON via POST | ||||
Header |
|
Body:
Parameter | Description / Example | Mandatory |
|---|---|---|
from | your WhatsApp account. international number without +. for example: 972771234567 | yes |
to | The user id you want to send the message to. for example: IL.1605856887361213 | yes |
body | your message goes here \n for new line text for bold text for italic ~ | yes |
showRequest | You can get back in the response an object with all the request you sent (without the 'apiKey') default is off (0) 1 - enable | no |
Response:
{
"status": "OK",
"unique": "d1e113e0-a8e3-4c8f-8958-rx83zj39",
"body": "Please click to provide your location",
"timestamp": 1705225312,
"from": "972507654321",
"to": "972501234567",
"templateTimeLeft": 1372,
"reason": 1
}
Response-Explain:
Parameter | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | OK or FAIL **Note: OK status doesn't mean the message arrived to the end user. it only means that the system received your request. You should listen to webhooks to see the status of your message. | ||||||||||||||||||
unique | unique ID for any message | ||||||||||||||||||
timestamp | Time stamp | ||||||||||||||||||
from | your WhatsApp account | ||||||||||||||||||
to | The number or the user id that the message was sent to | ||||||||||||||||||
templateTimeLeft | amount of minutes left since client's last message. if passed, you must use Template Message. This value resets every time the client is sending you a message. | ||||||||||||||||||
conversationTimeLeft | Deprecated this value is no longer in use. Conversation time left is now part of the webhook response instead. This parameter will be removed in future updates. until then, this value will show 0 always. | ||||||||||||||||||
originalRequest | Original request object, if you enabled this in 'showRequest' when sending the request. | ||||||||||||||||||
reason | 'reason' is the status explanation in case of FAIL
|