Skip to content
Whats91

Retrieve one webhook destination by its webhookUid.

Get Webhook

Summary

Retrieve one webhook destination by its webhookUid.

Prerequisites

  • Authorization: Bearer w91_live_xxx
  • Content-Type: application/json for JSON requests

Retrieves one webhook destination. webhookUid is the only public identifier for reading and updating a webhook.

GET/api/v2/webhooks/{webhookUid}

Retrieve one webhook destination.

ParameterTypeRequiredDescription
webhookUidstringRequiredWebhook UID returned as webhookUid by create and list.
senderIdstringOptionalWhatsApp sender that owns the webhook.
cURL
curl -X GET "https://graph.whats91.com/api/v2/webhooks/wh_abc?senderId=916268662275" \
  -H "Authorization: Bearer w91_live_xxx"
200 OK
{
  "success": true,
  "message": "Webhook retrieved",
  "data": {
    "webhookUid": "wh_abc",
    "uid": "wh_abc",
    "name": "CRM delivery hook",
    "endpointUrl": "https://crm.example.com/webhooks/whats91",
    "phoneNumber": "916268662275",
    "phoneNumberId": "1043189608869917",
    "events": ["message.inbound.text", "message.status.delivered"],
    "status": "ACTIVE",
    "timeoutMs": 5000,
    "retryEnabled": true,
    "retryMaxAttempts": 3,
    "verificationHeaderKey": "X-CRM-Webhook-Token",
    "hasVerificationToken": true
  },
  "metadata": {
    "apiVersion": "v2",
    "requestId": "request-uuid"
  }
}

Warning

Get, list, and update responses never return the signing secret, the encrypted secret, the verification token, or the token hash. The signing secret is returned exactly once, on create.

SDK Examples

Use these examples as starting points for server-side implementations.

cURL
curl -X GET "https://graph.whats91.com/api/v2/webhooks/{webhookUid}" \
  -H "Authorization: Bearer w91_live_xxx"
Node.js
const response = await fetch("https://graph.whats91.com/api/v2/webhooks/{webhookUid}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer w91_live_xxx"
  }
});

const data = await response.json();
console.log(data);
PHP
$ch = curl_init("https://graph.whats91.com/api/v2/webhooks/{webhookUid}");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer w91_live_xxx"
  ]
]);

$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests

response = requests.request(
    "GET",
    "https://graph.whats91.com/api/v2/webhooks/{webhookUid}",
    headers={
        "Authorization": "Bearer w91_live_xxx",
    }
)

print(response.json())
C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer w91_live_xxx");

var request = new HttpRequestMessage(HttpMethod.Get, "https://graph.whats91.com/api/v2/webhooks/{webhookUid}");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());

Related APIs