OneBot Trigger icon

OneBot Trigger

Receive OneBot webhook events and verify HMAC-SHA1 signature

OneBot Trigger

AI-generated

Summary

Receive OneBot webhook events and forward them after signature verification

Inputs

  • httpMethod — HTTP method for the incoming webhook request
  • path — Webhook path suffix to match (e.g., "onebot" yields "/webhook/onebot")
  • eventType — Filter for post_type (e.g., "message", "notice", "request", or empty for all)
  • messageType — Filter for message_type, applies only when eventType is "message"
  • noticeType — Filter for notice_type, applies only when eventType is "notice"
  • requestType — Filter for request_type, applies only when eventType is "request"
  • messageSubType — Filter for message sub_type, applies only when eventType is "message"
  • noticeSubType — Filter for notice sub_type, applies only when eventType is "notice"
  • requestSubType — Filter for request sub_type, applies only when eventType is "request"
  • userId — Comma‑separated list of user IDs to filter on; empty to accept all
  • groupId — Comma‑separated list of group IDs to filter on; empty to accept all
  • selfId — Optional filter for self_id; comma‑separated values; empty to accept all
  • targetId — Optional filter for target_id; comma‑separated values; empty to accept all
  • strictInvalidSignatureResponse — When true and a secret is set, invalid signatures cause a 401 response with an empty body
  • emitSkippedOnMismatch — When true, events that fail filters are forwarded with skipped=true; otherwise they are dropped

Output shape

a single JSON record representing the event, including optional skipped flag

If signature verification fails and strictInvalidSignatureResponse is enabled, an empty 401 response is returned; otherwise the event is passed through. The payload may contain additional fields like skipped, reason, and filters when filtering mismatches.

Examples

Example 1: Process private messages from a specific user

httpMethod=POST, path=onebot, eventType=message, messageType=private, userId=123456

Example 2: Capture all notice events for group admin actions

eventType=notice, noticeType=group_admin, groupId=

Example 3: Trigger on group invite requests

eventType=request, requestType=group, requestSubType=invite

Links

Discussion