Log webhook diagnostics without secrets

Record webhook event, delivery, type, timing, and status fields while excluding signing material, private payload data, and receiver secrets.

Last reviewed

Webhook diagnostics should explain an attempt without copying its credentials or private data. This matters especially for share.accessed, whose current payload contains the live share token.

Four panels show selecting safe webhook identifiers, redacting payload and signature material, returning a sanitized response, and tracing the delivery in Dosya.
Four panels show selecting safe webhook identifiers, redacting payload and signature material, returning a sanitized response, and tracing the delivery in Dosya. Open full-size screenshot.

Steps

  1. After signature verification, create a structured log record containing X-Dosya-Event-Id, X-Dosya-Delivery-Id, X-Dosya-Event-Type, receiver time, verification outcome, and an internal correlation or queue ID.
  2. Exclude the endpoint signing secret, raw X-Dosya-Signature, authorization material, and complete request body. Upload and deletion data contains file IDs and names; share-access data includes share_id and a bearer token.
  3. When an operator needs payload context, allowlist non-secret fields by event type and redact values before logging. Do not depend on a broad JSON serializer whose future fields could enter logs automatically.
  4. Return an empty or sanitized 2xx acknowledgement after durable intake. Dosya stores the first 500 characters of the receiver response, so response bodies can expose data in Recent deliveries even when application logs are clean.
  5. On failure, log the local exception class and internal trace ID rather than the payload. Dosya separately records the HTTP status, a clipped response snippet, or the transport error when no response arrives.
  6. Open Integrations → Webhooks → Deliveries and correlate a controlled test by event type, created time, status, attempts, and next retry. Confirm neither the receiver log nor Dosya’s response tooltip reveals a secret.

Every outgoing request also carries Content-Type: application/json and User-Agent: dosya-webhooks/1. These are useful transport facts but do not authenticate a delivery.

Reference for “Log webhook diagnostics without secrets”: Dosya REST API overview page with Get API Key and View SDKs links.
Reference for “Log webhook diagnostics without secrets”: Dosya REST API overview page with Get API Key and View SDKs links. Open full-size screenshot.

Expected result

Operators can trace a webhook from Dosya to the receiver using event, delivery, and internal job identifiers. Logs and stored response snippets omit signing secrets, share tokens, file payloads, and other confidential content.

Private text appears under Response. Remove it from the receiver response body, deploy the change, and avoid copying the existing snippet into tickets or chat.

A failure lacks an HTTP status. Treat the stored error as a DNS, TLS, network, or timeout path and correlate it with the receiver platform trace ID.

Was this helpful?

Loading helpfulness results…

Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.

Questions and replies

Ask about the steps in this guide. Questions are reviewed before publication.

Keep account details, credentials and private files out of public questions. Use private support for those.

Loading questions…

    Sign in to your Dosya account to ask a question.

    Check the outcome before you retry

    Use these shared checks when a task needs a second look.