Retrieve the private key
GET
/flows/{phone_number_id}/get_private_keyReturns the private key your Flow endpoint uses to decrypt requests from WhatsApp. Store it like a password, in your server's secret storage, never in code.
Authorization
apiKey apikey<token>
Your HostMentor API key, from the dashboard under Messaging → WhatsApp → API keys.
In: header
Path Parameters
phone_number_id*string
ID of your WhatsApp number, from the dashboard or List your phone numbers. It isn't the phone number itself.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://wa.hostmentor.com/v3/flows/106540352242922/get_private_key" \ -H "apikey: YOUR_API_KEY"{ "result": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA4I6QAFQ7T8/bwuIDcAvjt5RFG+mHiZJUzNl4IPn5RE2F...\n-----END RSA PRIVATE KEY-----"}