對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
驗證要求 (Dialogflow)
系統會使用授權權杖簽署對對話式 Webhook 的要求
,並採用以下格式:
authorization: "<JWT token>"
驗證權杖符合 JSON Web Token 格式,
其中目標對象欄位值等於 Actions Console 專案 ID
應用程式如要驗證簽章,請解壓縮權杖,並確認目標對象欄位
與應用程式的專案 ID 相符。方法是使用與 JWT 相容的
憑證程式庫,例如 Google API Node.js 用戶端
或直接使用 Actions on Google Node.js 用戶端程式庫
ActionsSdkOptions#verification
選項。
const {actionssdk} = require('actions-on-google');
const app = actionssdk({verification: 'nodejs-cloud-test-project-1234'});
// HTTP Code 403 will be thrown by default on verification error per request.
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-15 (世界標準時間)。
[null,null,["上次更新時間:2024-10-15 (世界標準時間)。"],[[["Conversational webhook requests are signed with a JWT token in the authorization header for security."],["The JWT token's audience field should match your Actions Console project ID for verification."],["You can verify the token using JWT libraries or the Actions on Google Node.js Client Library's built-in verification option."]]],[]]