Hızlı ve güvenilir dosya barındırma hizmeti.
Dosyalarına bir bok olduğunda haberin olsun. Önemli bir şey olduğunda URL'ine HTTP POST istekleri göndeririz.
| Başlık | Açıklama | Örnek |
|---|---|---|
X-Buzzheavier-Signature |
HMAC SHA256 imzası | buzzheavier.com |
X-Buzzheavier-Event |
Buzzheavier olay türü | FILE_EXPIRY |
User-Agent |
Buzzheavier HTTP istemcisinin user agent'ı | Buzzheavier-Webhook/1.0 |
| Olay türü | Ne zaman gönderilir |
|---|---|
| FILE_EXPIRY | Bir dosyanın süresi dolduğunda |
{
"event_type": "FILE_EXPIRY",
"timestamp": "2024-02-20T15:04:05Z",
"data": {
"id": "abc123def456",
"name": "document.pdf",
"expired_at": "2024-02-20T15:04:05Z",
"directory_id": "xyz789"
}
}
Her webhook isteği bir imza içerir. Şöyle doğrularsın:
// Your webhook secret from settings page
secret = "your_webhook_secret"
// Get signature from header
signature = request.headers["X-Buzzheavier-Signature"]
// Calculate expected signature
payload = request.body
expected = hmac_sha256(secret, payload)
// Compare (use constant time comparison)
if signature == expected {
// Request is from Buzzheavier
}