رفتن به محتوا
چسبیتوسعه‌دهندگان
وب‌هوک‌ها

A test the owner sent

شرح نقطه‌های پایانی در مرجع API به انگلیسی است؛ واژه‌ها و قالب‌ها همان است که در پاسخ‌ها می‌بینید.

نمونه‌ها نشانی محیط اصلی را دارند، اما «امتحان کنید» همان درخواست را فقط به محیط آزمایشی می‌فرستد. کلید محرمانه شما نه در این سایت ذخیره می‌شود و نه در گزارش‌های آن می‌آید.

The owner pressed «ارسال آزمایشی» in the Seller panel, to try the address and its signature.

Chasbi posts it to the Seller's webhook address, which its owner sets in the Seller panel while API access is on, as Standard Webhooks 1.0.0 describes, with the User-Agent Chasbi-Webhooks/1. The body is thin, ids and numbers only: read the rest with the key. webhook-signature is v1, and the base64 HMAC-SHA256 of webhook-id, webhook-timestamp and the body joined by dots, keyed with the bytes the secret holds after its whsec_ prefix, decoded from base64. For a day after the owner rotates the secret, it holds a signature with each secret, separated by a space. Refuse a webhook-timestamp more than five minutes from the receiver's clock.

Any 2xx answer delivers it, and 410 pauses the address at once. Any other answer, a redirect included, or none within 15 seconds, sends it again after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours, each with up to a tenth more, or after Retry-After when it is under an hour; then the delivery fails, and the owner may send it again. An address with no success for three days is paused until the owner resumes it.

پارامترهای سرآیند

webhook-id*string

The delivery's id, the same on every attempt of it: keep it to handle a delivery once.

webhook-timestamp*integer

When this attempt was sent, in Unix seconds.

قالبint64
webhook-signature*string

v1, and the signature in base64; two, separated by a space, while a rotated secret still signs.

بدنه درخواست

application/json
  1. body

The webhook the owner sends to try the address.

data*

Empty.

timestamp*string

When it happened.

قالبdate-time
type*"webhook.test"

What happened.

مقدار در"webhook.test"

بدنه پاسخ

Gone: the address is paused at once.

نمونه درخواست‌ها
POST/webhook.test

The webhook the owner sends to try the address.

بدنه درخواست
application/json
{  "data": {},  "timestamp": "2019-08-24T14:15:22Z",  "type": "webhook.test"}
پارامترهای سرآیند
{  "webhook-id": "5eed0000-0000-4000-8000-0000000d0001",  "webhook-timestamp": 1794123000,  "webhook-signature": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4="}