Webhook
Signature Verification
X-Swiftpod-Signature on a webhook's headers can be used to verify that a webhook came from Swiftpod. A signature segment is an SHA-256 hash of a UTF-8 encoded API key and the request body.
$myApiKey = '****';
$headers = getallheaders();
$signature = $headers['X-Swiftpod-Signature'];
$body = file_get_contents('php://input');
$mySignature = hash_hmac('SHA256', $body, $myApiKey);
$valid = $mySignature == $signature ? true: false;
AUTHORIZATION Bearer token
Last modified: 4 months ago