{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Webhook"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhook","__idx":0},"children":["Webhook"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クラウドフォンやクラウドブラウザーの操作が最終結果に達すると、MoreLogin が自社の HTTPS エンドポイントへ JSON イベントを POST するため、結果をポーリングする必要はありません。コールバック URL はチームごとに 1 つだけ保存され、Local API と Open API は同じレコードに書き込みます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"コールバック-url-を設定する","__idx":1},"children":["コールバック URL を設定する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["どちらの入口でも同じ操作を提供しています。Open API："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.morelogin.com/webhook/config\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -d '{\n    \"callbackUrl\": \"https://example.com/morelogin/webhook\",\n    \"enabled\": true\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Local API："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/webhook/config\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"callbackUrl\": \"https://example.com/morelogin/webhook\",\n    \"enabled\": true\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Local API のこのルートはデスクトップクライアントが提供するため、MoreLogin クライアント v2.66.0 以降が必要です。Open API の入口はクライアントに依存しません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["teamId"]}," はリクエストから読み取りません。各呼び出しはサーバー側コンテキストのチームを設定するため、他チームのイベントを自分のエンドポイントへ向けることはできません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["URL は HTTPS で、1〜1024 文字、ホスト名があり、ユーザー情報とフラグメントを含まず、ポートが正しい必要があります。解決先のすべてのアドレスが公開経路である必要があり、localhost、プライベート、リンクローカル、CGNAT、クラウドメタデータ、プロトコル予約、ドキュメント用、6to4 などの範囲は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/api-reference/getting-started/error-codes"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["41001"]}]}," で拒否されます。配信が接続を開く時点でも同じ検査を行うため、後からプライベート範囲に解決されるホスト名は、その配信が失敗するだけで、あなたのネットワークには到達しません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["保存はチーム単位の upsert なので、同じ本文を 2 回送っても影響はありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"配信を停止する","__idx":2},"children":["配信を停止する"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enabled: false"]}," は保存済みの URL を残したまま、新しいイベントの作成を停止します。すでにキューにあるイベントは 1 件ずつキャンセルされますが、キャンセルされるのは各イベントが次に承認される時点で、かつ設定がまだ停止中の場合だけです。そのためすぐに再有効化すれば、キュー内のイベントは破棄されずそのまま配信されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"配信の中身","__idx":3},"children":["配信の中身"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各配信は次のヘッダーを持つ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," です："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"ヘッダー"},"children":["ヘッダー"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"値"},"children":["値"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["User-Agent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MoreLogin-Webhook/1.0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Webhook-Event-Id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["本文の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventId"]}," と同じ"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Webhook-Event-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["本文の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventType"]}," と同じ"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["2 つの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Webhook-*"]}," ヘッダーは意図的に本文のフィールドと重複させています。これによりルーターやキューは JSON を解析せずに振り分けられます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"eventId\": \"c7f3a2b10d8e4f6a9c1b2d3e4f5a6b7c\",\n  \"eventType\": \"cloud_phone.power_off\",\n  \"eventTime\": \"1787241600000\",\n  \"data\": {\n    \"teamId\": \"10001\",\n    \"cloudPhoneId\": \"20001\",\n    \"reason\": \"MONEY_SAVING\"\n  },\n  \"result\": {\n    \"success\": true,\n    \"code\": \"0\",\n    \"message\": null\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"フィールド"},"children":["フィールド"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"説明"},"children":["説明"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["一意のイベント ID。同じイベントの再送や内部リプレイでも再利用されるため、これが冪等キーになります"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["安定したイベント名。値は下の表を参照"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventTime"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最終結果が発生した時刻。Unix エポックのミリ秒で、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["文字列として送信"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.teamId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["このリソースを所有するチーム。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["文字列として送信"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.cloudPhoneId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["このイベントの対象となるクラウドフォン。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["文字列として送信"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.cloudBrowserId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["このイベントの対象となるクラウドブラウザーのプロファイル。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["文字列として送信"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.runId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["このイベントの対象となるクラウドブラウザーの実行インスタンス"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.reason"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.power_off"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_browser.stop"]}," のみに付きます"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.success"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["この操作が最終的に成功したかどうか"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["成功時は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},"。それ以外は言語に依存しない安定したビジネスエラーコード"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.message"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["成功時は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},"。それ以外はチームの言語による説明で、無い場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["en-US"]}," にフォールバック"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["数値の識別子と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventTime"]}," はすべて JSON 文字列として届きます。API の他の部分と同じ扱いです（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/api-reference/getting-started/response-format"},"children":["共通レスポンス形式"]}," を参照）。数値ではなく文字列として解析してください。そうしないと 64 ビット ID の精度が失われます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"イベント","__idx":4},"children":["イベント"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"eventType"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventType"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"報告される最終結果"},"children":["報告される最終結果"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.power_on"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["起動の成功または失敗"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.power_off"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["停止の成功。停止が失敗した場合はイベントは発生しません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.restart"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["再起動の成功または失敗"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.reset"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["リセットの成功または失敗"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.new_machine"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ワンクリック新規端末化の成功または失敗"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_browser.start"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クラウドブラウザーの起動の成功または失敗"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_browser.stop"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クラウドブラウザーの停止試行ごとの成功・失敗"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クラウドフォンのイベントは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["teamId"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloudPhoneId"]}," を含みます。クラウドブラウザーのイベントは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["teamId"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloudBrowserId"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["runId"]}," を含みます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["起動、再起動、リセット、ワンクリック新規端末化が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success: true"]}," を報告するのは、デバイスサービスのコールバックが成功し、ローカル同期がコミットされた後だけです。起動時の課金失敗、または非同期のプロキシ検査が失敗して後処理まで完了した場合は起動失敗を報告し、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["別途"]},"停止イベントは発生しません。プリセットアプリのインストールや期限切れファイルの削除など後回しにされた処理は、この結果を変更しません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["停止操作が起動を中断した場合、その試行では起動イベントは発生しません。その後に停止が成功すれば、独立した ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.power_off"]}," が発生します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"停止理由","__idx":5},"children":["停止理由"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_phone.power_off"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.reason"]}," を追加します："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"値"},"children":["値"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"意味"},"children":["意味"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NORMAL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["通常の停止"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MONEY_SAVING"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["節約モード"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OTHER"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["未払い、期限切れ、保守、その他"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloud_browser.stop"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.reason"]}," を追加します："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"値"},"children":["値"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"意味"},"children":["意味"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NORMAL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["通常の終了"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MONEY_SAVING"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["節約モード"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ENERGY_SAVING"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["省電力モード"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BROWSER_EXITED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ブラウザーが予期せず終了した"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OTHER"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["その他"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["内部のアーカイブ失敗は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}," のみに影響し、停止開始時に確定した ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reason"]}," を上書きすることはありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"配信リトライ順序","__idx":6},"children":["配信、リトライ、順序"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2xx"]}," はすべて配信成功として扱います。それ以外のステータス、接続タイムアウト、読み取りタイムアウト、ネットワークエラーはすべて失敗です。接続タイムアウトは 5 秒、読み取りタイムアウトは 30 秒です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["配信が失敗した場合、最大 6 回リトライし、間隔は 10 秒、30 秒、60 秒、3 分、10 分、30 分です。つまり 1 つのイベントで最大 7 回のリクエストになります。6 回目のリトライが失敗すると、そのイベントは自動リトライを停止します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["同じクラウドフォン、または同じクラウドブラウザーのイベントは、作成順に 1 件ずつ配信されます。異なるリソースは並行して配信されるため、それらの間の順序は前提にしないでください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["1 つのイベントのリトライは、常に同じ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventId"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventTime"]},"、本文を再利用します。ネットワークや復旧の例外的な状況では、これらの値が変わらないまま同じイベントが複数回配信されることがあるため、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventId"]}," で重複排除してください"]},"。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クラウドブラウザーの停止では、1 回の停止試行がちょうど 1 つのイベントを生成します。その後の手動リトライ、手動の強制解放、システムによる強制解放はいずれも新しい操作であり、新しい ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventId"]}," が割り当てられます。2 回の試行が 1 つのイベントにまとめられることはありません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["クラウドフォンの操作は、デバイスサービスのタスク ID、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["traceId"]},"、または安定した業務時刻で識別します。いずれも存在しない場合、サービスは UUID を生成し、現在の最終コールバックを新しい操作として扱うため、2 つの異なる操作が 1 つにまとまるのではなく、新しい ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventId"]}," が発行されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"受信側の実装","__idx":7},"children":["受信側の実装"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["イベントを保存できたらすぐに ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2xx"]}," を返し、実処理は非同期で行ってください。レスポンス本文は無視されます。処理が遅いと 30 秒の読み取り予算を使い切り、受信済みであってもそのイベントはリトライ待ちに回されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventId"]}," で重複排除してください。重複は既に処理済みとして扱い、副作用を再実行しないようにします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["自分のエンドポイントに届いたからといって、本文を信頼できる入力として扱わないでください。本リリースではコールバックに署名しないため、URL を知った人は誰でも送信できます。推測しにくい URL を使い、コストの大きい処理を行う前に API で状態を確認してください。たとえばクラウドフォンなら ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/api-reference/cloud-phone/open-api"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/info"]}]},"、クラウドブラウザーの実行なら ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudbrowser/page"]}," です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.code"]}," は同期 API と同じビジネスエラーコードを使うため、失敗は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/api-reference/getting-started/error-codes"},"children":["エラーコード"]}," で調べられます。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.message"]}," は人間向けの文字列で、文言も言語も変わる可能性があります。分岐は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.success"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.code"]}," で行い、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.message"]}," では決して行わないでください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各イベントの機械可読な契約（スキーマとイベントごとの例を含む）は、共有リソースの仕様とともに ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/api-reference/shared-resources/open-api"},"children":["Shared Resources Open API"]}," で公開されています。"]}]},"headings":[{"value":"Webhook","id":"webhook","depth":1},{"value":"コールバック URL を設定する","id":"コールバック-url-を設定する","depth":2},{"value":"配信を停止する","id":"配信を停止する","depth":3},{"value":"配信の中身","id":"配信の中身","depth":2},{"value":"イベント","id":"イベント","depth":2},{"value":"停止理由","id":"停止理由","depth":3},{"value":"配信、リトライ、順序","id":"配信リトライ順序","depth":2},{"value":"受信側の実装","id":"受信側の実装","depth":2}],"frontmatter":{"seo":{"title":"Webhook"}},"lastModified":"2026-09-10T13:09:25.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/api-reference/getting-started/webhooks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}