发送到此 webhook 服务器的请求将包含用于对服务账号 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 Invoker (roles/run.invoker) 和 Cloud Functions Invoker (roles/cloudfunctions.invoker) 角色的权限,以便该 webhook 发布请求能够通过 Google Cloud Functions 身份验证。此 API 可以向任意 URI 发送 webhook 通知;对于 Google Cloud Functions 以外的 webhook 服务器,如果不需要授权 Bearer 标头中的此 ID 令牌,则应忽略该令牌。
[[["易于理解","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):2024-11-20。"],[[["Webhook notifications can be configured for long-running operations in the Google Analytics Data API to send updates to your server."],["These notifications are project-specific and include a JSON payload with operation details and a timestamp."],["The webhook configuration requires a URI using HTTPS with a valid SSL certificate, and optionally, a channel token for verification."],["When receiving a notification, your server should respond with an HTTP 200 status code within 5 seconds."],["Authentication for Google Cloud Functions is provided through an ID token representing the service account `google-analytics-audience-export@system.gserviceaccount.com`, while other webhook servers can ignore this token."]]],["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"]]