---
title: "Webhook'lar"
description: "İmzalı webhook'lar: olaylar, başlıklar ve HMAC imza doğrulama."
url: https://www.gyrohosting.com/developers/tr/guides/webhooks.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Webhook'lar

`POST /cloud/webhooks` ile oluşturun; 64 karakterlik gizli anahtar bir kez gösterilir. Her teslimi doğrulayın:

```
import hmac, hashlib, time
def valid(secret, ts, body, signature):
    if abs(time.time() - int(ts)) > 300: return False
    mac = hmac.new(secret.encode(), (ts + "." + body).encode(), hashlib.sha256).hexdigest()
    return hmac.compare_digest("sha256=" + mac, signature)
```

Başlıklar: `X-Gyro-Event`, `X-Gyro-Delivery`, `X-Gyro-Timestamp`, `X-Gyro-Signature`. 4 saniye içinde 2xx dönün.
