WhatsApp over API
Use the dedicated Infobip API for WhatsApp to perform the actions you need when using WhatsApp as your communication channel.
Connections need to be secured by one of the following:
- BASE64 hash combination of Infobip credentials
- API keys
- Tokens (recommended)
Please follow the Authentication guide to secure your connection with Infobip, then make sure you are fully aware of all message limitations before using the API to send messages.
For all WhatsApp API requests, you should use the WhatsApp sender you have registered with Infobip in international format.
Message templates are approved messages by WhatsApp for use outside of the permitted messaging window. Use the API to retrieve your templates, along with their statuses.
To successfully send a message all parameters need to match. If templates contain two placeholders, template data needs to contain exactly two parameters, otherwise, templates will not render properly on devices. The number of parameters in the registered template must match the number of parameters specified in the API call.
Make sure to check out the WhatsApp Templates API documentation for more details per message type before creating templates.
You can also use a failover to SMS option with your message templates, in the case that the WhatsApp message-send fails.
You can only send free-form messages within the permitted messaging window. In all other cases, you'll need to revert back to sending your approved templates.
Make sure you are familiar with all messaging limitations and supporting file types before sending any message communications.
You can send the following free-form messages over API:
Incoming messages are forwarded to you in real-time when you are using WhatsApp for two-way communication.
If you are forwarding messages to an API endpoint, you will need to grant permission to it for the Infobip platform. Connections can be secured with additional authorization headers.
Customers are able to send you messages and using the API you can download incoming media.
- Interactive button reply
- Interactive list reply
- Other media
- Unsupported Files
Quoted messages allow users to swipe on a message to indicate they are directly replying to that message. When they swipe a message, it will be quoted and sent upon responding.
Every incoming message that is quoted by an end-user has context, which consists of an
ID, which in turn shows the
messageId for the quoted message and
from which indicates the sender number.
Mark as Read
Mark incoming messages as read to indicate to users that they can expect a response. This feature is not enabled by default and will require enabling by Infobip support or your dedicated Account Manager.
Messages and media sent by users are cached for 30 days, after which point it is no longer available. Delete messages manually in the web interface or using API.
Use the API to keep an eye on how your communications are performing. The following reports are forwarded to a defined endpoint: