SETUP GUIDES · MESSAGING
WhatsApp through AWS
Send WhatsApp messages from your own business number with AWS End User Messaging.
WhatsApp messages come from your own business number with your business name. Meta requires a verified business and approved templates for messages you start; AWS End User Messaging connects your WhatsApp Business Account to your AWS account and bills you for Meta’s fees. Claspine sends through it with a key you give it, checks your setup, and lets you create templates without leaving the console. The steps at Meta and AWS are yours and happen once.
Words you’ll see
- WhatsApp Business Account
- Your business’s account at Meta for WhatsApp, holding your phone numbers, display name and message templates. You create it once through AWS; it stays yours.
- Message template (WhatsApp)
- A message text Meta approved in advance, with numbered blanks {{1}}, {{2}}. WhatsApp only lets businesses start a conversation with an approved template.
- IAM user
- In AWS, a separate login made for one purpose, with only the permissions you give it. Your own (root) login can do everything, so it should never be handed to any service.
- Policy
- A short list of what a user or key is allowed to do, written as JSON. You paste the one from the guide; it allows only what Claspine needs.
- Access key ID and secret access key
- A pair of values that works like a username and password for programs. The ID can be shown; the secret is shown once when you create it.
- Region
- The part of the world where the provider runs your service, such as us-east-1 (Virginia) or europe-west4 (Netherlands). Use the region where you set things up.
- Test recipient
- An email address or phone number your project may message with test API keys (sp_test_). Keeps an unfinished integration from messaging real customers.
Before you start
- A Meta business portfolio at business.facebook.com for your company. Start business verification (Settings → Security centre) early: unverified businesses can message only a few people a day.
- A phone number that is not used in the WhatsApp or WhatsApp Business app and can receive an SMS or call for the code.
- An AWS account.
Steps
- In the AWS End User Messaging Social console, choose a region (top right) and note it, for example
ap-south-1. - Choose Add WhatsApp phone number and Launch Facebook portal. Sign in to Facebook, choose your business portfolio, create a WhatsApp Business Account, add your phone number and display name, and verify the number with the code. Back in AWS, finish adding the number (an event destination is optional for now).
- In WhatsApp Manager → Phone numbers, check that your display name is approved. Until it is, people see your business portfolio’s name.
- Create a key for Claspine as in the SES guide (IAM user
claspine-messagingwith the policy shown there; the WhatsApp part is what this channel needs), and add it under Messaging → Setup → WhatsApp → 2. Connect → Add key. If you already did this for SES, the same key works. - In the Claspine console open Messaging → Setup → WhatsApp, enter the region and save, then Check my WhatsApp setup. Choose Send from this next to your number.
- Create a template. Open Messaging → Templates → New WhatsApp template for Meta: a name (e.g.
order_shipped), language, category UTILITY for order updates and reminders, and the text with numbered blanks, e.g. “Hello {{1}}, your order {{2}} has shipped. Track it in your account.” Give an example for each blank and submit. Meta usually approves UTILITY templates within minutes; run the check again to see the status. - When it is APPROVED, add your own template under Templates: channel WhatsApp, choose the Meta template, and list your variable for each blank in order (
name, order). - Under Messaging → Test, add your own number as a test recipient and send a test. Then send from your backend with an
sp_test_key to test recipients, and ansp_live_key for customers.
What goes where in Claspine
| Console field | Value |
|---|---|
| Messaging → WhatsApp → REGION | The AWS region of step 1. |
| Messaging → WhatsApp → number | Chosen after the check; it is the AWS phone number ID (phone-number-id-…). |
| Templates → Meta template and variables | An approved template, and your variable names for {{1}}, {{2}}, … in order. |
Keep it safe
- Message only people who agreed to hear from you on WhatsApp (Meta’s opt-in rule). Meta lowers the quality rating and the messaging limit of numbers people block or report.
- Use UTILITY templates for transactional messages; MARKETING templates need explicit marketing consent.
- Messages you start need an approved template; free text is only allowed within 24 hours of the person writing to you.
Claspine stores the values encrypted, never shows them again in full, and never sends them to your app or SDK.
If something goes wrong
- Check says no WhatsApp Business Account is linked.
- Finish step 2 in the same AWS region you entered in Claspine.
- Meta rejects a template: “too many variables for its length”.
- Add more fixed words around the blanks; never start or end the text with a blank.
- A message fails: template does not exist in the language.
- Map the exact language the template was approved in (e.g. en vs en_US).
- Recipients see your company name, not your brand.
- The display name is not approved yet; check WhatsApp Manager → Phone numbers.