Sending WhatsApp Session Message
If a WhatsApp user has sent your application a message — whether it’s a reply to one of your outbound messages templates, or they have initiated communication themselves — your application has a 24-hour window to send that user any messages, without using a template. These are known as Session Messages.
Key Characteristics of Session Messages:
- 24-Hour Messaging Window
- The 24-hour window starts when the customer sends a message to the business.
- During this period, the business can respond freely with any type of message.
- No Pre-Approval Required
- Unlike template messages, session messages do not require pre-approval from WhatsApp. Businesses can send any content type as long as it’s within the 24-hour window.
- Unlike template messages, session messages do not require pre-approval from WhatsApp. Businesses can send any content type as long as it’s within the 24-hour window.
- Message Types. These session message types can be sent as a reply to a previous message.
- Text messages: Basic conversational text.
- Media messages: Images, videos, audio files, documents.
- Contacts messages: Send contact information.
- Location messages: Send location information.
- Interactive messages: Reply Buttons and Interactive List
NOTE
The total number of API Calls (requests) that the user can make to the POST /notification endpoint in a certain time has been limited. That is, in case the user exceeds the limit of requests (messages sent) that can be made in a specific time, he/she will not be able to send another request until the established time is up. Once the time has elapsed, the request counter is reset and the request can be sent to the endpoint again.
In this example, the user can send 2 requests in 300 seconds (5 minutes). When a third request is sent within the 5 minute range, the
HTTP Status Code “429”
will be generated and the following parameter will be displayed from the Response body:"errors": { "reason": Too Many Requests" }
. This code tells you that the user has sent too many requests in a given amount of time. Once the required time has elapsed, the request counter is reset to 2, so the user will be able to send two requests again in 5 minutes.To find out if the user exceeds the limit of required requests and the time he/she needs to wait to send the next request, we recommend consulting the Response Header (additional information about the body of the resource). The parameters presented in the response header are the following:
ratelimit-limit: 2
ratelimit-policy: 2;w= 300
ratelimit-remaining: 1
ratelimit-reset: 5m0s
- RateLimit-Limit: return the number of requests left for the client in the time window
- RateLimit-Remaining: return the remaining quota in the current window
- RateLimit-Reset: return the time remaining in the current window, specified in seconds
- RateLimit-Policy: return the quota policy. The quota policy expression can be found in paragraph 2.1 of the IETF draft. The format is, for example, for 2 requests in 300 seconds.
Updated about 20 hours ago