logo
enes

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:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/flows/{{waba_id}}/{{business_phone_number}}/encryption
MethodPOST
Typeapplication/x-www-form-urlencoded

Headers

Flow encryption headers:

NameDescriptionTypeRequirements
Content-Typeapplication/x-www-form-urlencodedStringRequired
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Flow encryption parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
business_phone_numberPhone number linked to a WABA.StringRequired

Body

Flow encryption body fields:

NameDescriptionTypeRequirements
business_public_keyGenerated 2048-bit RSA public key.StringRequired

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-----
AAA
BBB
CCC
DDD
EEE
FFF
GGG
-----END PUBLIC KEY-----'

Response

Flow encryption response:

NameDescriptionType
successReturns true if the public key was uploaded successfully; otherwise, returns false.Boolean
{
"success": true
}

Previous
Publish, deprecate and delete Flows
Next
Error codes