サブスクリプション プロキシ

本番環境で通知に登録するには、通知を処理する有効な SSL 証明書を使用してコールバック URL を提供する必要があります。開発目的では、非 SSL コールバック URL に通知を転送する Google が提供するサブスクリプション プロキシ サーバーを使用できます。

サブスクリプション プロキシを使用するには、次のような非 SSL コールバック URL をプロキシ サーバーの転送 URL に追加します。

https://mirrornotifications.appspot.com/forward?url=<your_callback_url>

通知に登録するときに、転送サービスの URL とコールバック URL を含む完全な URL を指定します。例:

POST /mirror/v1/subscriptions HTTP/1.1
Authorization: Bearer auth token
Content-Type: application/json
Content-Length: length

{
  "collection": "timeline"
  "userToken": "harold_penguin",
  "operation": ["UPDATE"],
  "callbackUrl": "https://mirrornotifications.appspot.com/forward?url=http://example.com/notify/callback"
}