Flow encryption
Last update: 6 hours ago by Irais Aguirre
Set the public key used to encrypt the data exchanged with a Flow's endpoint.
Integration summary
- Base URL:
https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services- Token: admin token, in the
Authorization: Bearer {{admin-token}}header (how to generate it)- Endpoints on this page:
POST /v1/flows/{{waba_id}}/{{business_phone_number}}/encryption: Flow encryption
Flow encryption
Request
Flow encryption request:
| URL | https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}/{{business_phone_number}}/encryption |
| Method | POST |
| Type | application/x-www-form-urlencoded |
Headers
Flow encryption headers:
| Name | Description | Type | Requirements |
|---|---|---|---|
| Content-Type | application/x-www-form-urlencoded | String | Required |
| Authorization | Admin token. See Generate authentication token. | String | Required |
Parameters
Flow encryption parameters:
| Name | Description | Type | Requirements |
|---|---|---|---|
| waba_id | WhatsApp Business Account ID. | String | Required |
| business_phone_number | Phone number linked to a WABA. | String | Required |
Body
Flow encryption body fields:
| Name | Description | Type | Requirements |
|---|---|---|---|
| business_public_key | Generated 2048-bit RSA public key. | String | Required |
Example
Complete Flow encryption example:
curl --location --request POST 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}/{{business_phone_number}}/encryption' \--header 'Authorization: Bearer {{admin-token}}' \--header 'Content-Type: application/x-www-form-urlencoded' \--data-urlencode 'business_public_key=-----BEGIN PUBLIC KEY-----AAABBBCCCDDDEEEFFFGGG-----END PUBLIC KEY-----'
Response
Flow encryption response:
| Name | Description | Type |
|---|---|---|
| success | Returns true if the public key was uploaded successfully; otherwise, returns false. | Boolean |
{"success": true}
