Managed secret providers
WhatsApp Business
Connect WhatsApp Business to Alter Vault for secure API access
Overview
Section titled “Overview”Use WhatsApp Business credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | whatsapp-business |
| Category | Communication |
| Credential Type | Bearer Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Log in to Meta for Developers
Log in to Meta for Developers at developers.facebook.com/apps/.
Select the application
Select the application (or create one with WhatsApp product).
Go to WhatsApp → API Setup
Go to WhatsApp → API Setup in the left sidebar.
Generate an access token
Generate a temporary access token or create a system user token for production.
Copy your access token
Copy the access token.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add WhatsApp Business
Go to Managed Secrets > Add Provider > WhatsApp Business.
Enter credentials
Paste your Access Token into the credential field.
Save
Click Save. You’ll receive a grant_id to use with the SDK.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.POST, "https://graph.facebook.com/YOUR_API_VERSION/YOUR_PHONE_NUMBER_ID/messages", grant_id="YOUR_GRANT_ID",)- Temporary tokens expire after 24 hours. For production, create a System User token in Business Settings.