You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询谷歌用户Webhook实际事件名称及文档与实际差异的补充资料

Google Workspace User Webhook: Actual Event Names vs. Documented Names

Great question—this mismatch between the documented event names and what's actually sent in the X-Goog-Resource-State header is a common gotcha for Google Workspace Webhook developers. Let's break this down clearly:

Observed vs. Documented Event Values

First, let's map what you've seen in real requests to the names listed in the official docs:

  • Documented add → Actual value: create (this is what will appear in X-Goog-Resource-State for new user additions)
  • Documented makeAdmin → Actual value: make_admin (snake_case instead of camelCase for this event)
  • delete and update → These match between docs and actual requests, no discrepancy here

Why the Discrepancy?

Google’s documentation often uses user-friendly camelCase labels for event categories, but the actual wire format (sent in headers) uses snake_case or more literal terms like create instead of add. This pattern shows up across multiple Google Workspace APIs and webhook systems—docs prioritize readability, while the actual payload/headers use consistent naming conventions for backend systems.

Alternative Official Documentation Sources

While the main event list might show the simplified names, you can find the exact header values in:

  1. Admin SDK Webhook Request Reference: Deep in the request structure section, the docs explicitly list the valid values for X-Goog-Resource-State, including create and make_admin.
  2. Google Webhook Testing Tool: When you use Google’s official tool to simulate user webhook events, the sample requests will include the real header values, which align with what you’ve observed.

Key Takeaway

Always rely on the actual header values (create, delete, make_admin, update) when building your webhook handler—these are the values that Google’s systems will send consistently. The documented names are more like aliases for clarity, not the literal values you’ll process.

内容的提问来源于stack exchange,提问作者jelder

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 03:32:04