List the sample signed webhook events
GET
https://api.testingapis.com/api/webhooks/samplesAll samples are signed with the secret whsec_apibee_test_secret.
Responses
- 200
- The signing secret and the list of available samples.
Example
Request
curl -X GET "https://api.testingapis.com/api/webhooks/samples"Response200 OK
{
"signingSecret": "whsec_apibee_test_secret",
"note": "Each sample returns the exact signed payload as the body, with the provider's signature headers. ?format=envelope returns everything as JSO…
"samples": [
{
"provider": "stripe",
"eventType": "payment_intent.succeeded",
"signatureHeader": "Stripe-Signature",
"url": "/api/webhooks/samples/stripe"
},
{
"provider": "github",
"eventType": "push",
"signatureHeader": "X-Hub-Signature-256,
… (10 more lines)Code examples
JavaScript (fetch)
const response = await fetch("https://api.testingapis.com/api/webhooks/samples");
console.log(response.status, await response.text());Python (requests)
import requests
response = requests.request(
"GET",
"https://api.testingapis.com/api/webhooks/samples",
allow_redirects=False,
)
print(response.status_code, response.text)Java (HttpClient)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newBuilder()
.followRedirects(HttpClient.Redirect.NEVER)
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.testingapis.com/api/webhooks/samples"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}