发送到此网络钩子服务器的请求将包含用于对服务账号 google-analytics-audience-export@system.gserviceaccount.com 进行身份验证的 ID 令牌。如需详细了解 ID 令牌,请参阅 https://cloud.google.com/docs/authentication/token-types#id。对于 Google Cloud Functions,这让您可以将函数配置为需要进行身份验证。在 Cloud IAM 中,您需要向 Cloud Run 调用者 (roles/run.invoker) 授予服务账号权限,webhook post 请求的 Cloud Functions Invoker (roles/cloudfunctions.invoker) 角色,以传递 Google Cloud Functions 身份验证。此 API 可以向任意 URI 发送 webhook 通知;对于 Google Cloud Functions 以外的 Webhook 服务器,如果不需要,则应忽略授权不记名标头中的此 ID 令牌。
channelToken
string
可选。渠道令牌是任意字符串值,字符串长度不得超过 64 个字符。渠道令牌可让您验证网络钩子通知的来源。这样可以防止邮件被仿冒。渠道令牌将在 webhook POST 请求的 X-Goog-Channel-Token HTTP 标头中指定。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2026-04-24。"],[],["This document outlines the configuration for webhook notifications from the Google Analytics Data API. You can set up a webhook server (`uri`) to receive POST requests containing long-running operation resource updates in JSON format, along with a `sentTimestamp`. The `uri` must be HTTPS with a valid SSL certificate and is required for webhook notifications. Optionally, use a `channelToken` for source verification, which is included in the `X-Goog-Channel-Token` header. Notifications will include an ID token for authentication.\n"]]