Expand description
The webhook side of push delivery: which headers carry the notification token, how a receiver reads it, and how a webhook URL is named in logs.
§Why two token headers
The specification does not name the header. §4.3.3’s request example
shows only Authorization and Content-Type, and a2a.proto describes
TaskPushNotificationConfig.token as “a token unique for this task or
session” without saying how it travels. The two reference SDKs chose
differently:
- a2a-sdk (Python) 1.1.5,
server/tasks/base_push_notification_sender.py:headers = {'X-A2A-Notification-Token': push_info.token} - a2a-go v2.5.0,
a2asrv/push/sender.go:var tokenHeader = http.CanonicalHeaderKey("A2A-Notification-Token")
A webhook written against one never sees the other’s token, so
HttpPushSender sends both — the same value
twice, which costs one header line and cannot confuse a receiver that
reads either — and notification_token accepts both.
Constants§
- NOTIFICATION_
TOKEN_ HEADER - The
X-A2A-Notification-Tokenspelling, which a2a-sdk (Python) sends and reads. - NOTIFICATION_
TOKEN_ HEADER_ UNPREFIXED - The
A2A-Notification-Tokenspelling, which a2a-go sends and reads.
Functions§
- notification_
token - Reads the push notification token from a webhook request’s headers, under either spelling.