Create Webhooks
Untuk membuat webhook baru, buat panggilan GET
ke /webhooks
.
Prerequisite
All API calls require authentication with
API_TOKEN
Developers can authenticate their API calls with the API_TOKEN
generated in App Dashboard > Phone Numbers > Detail > Api
. Contoh
Sampel request:
curl -X POST 'https://waofficial.botika.online/api/whatsapp/v1/webhooks' \ -H 'Authorization: Bearer {{ API_TOKEN }}' \ -H 'Content-Type: application/json' \ -d '{ "name": "{{ WEBHOOK_NAME }}", "url": "{{ WEBHOOK_URL }}", "events": [ "outbound notifications", "inbound notifications" ], "status": "ACTIVE" || "INACTIVE" }'
Dari request tersebut akan mengembalikan JSON dengan format:
null