התכונה 'פעולות שיחה' הוצאה משימוש ב-13 ביוני 2023.
כאן תוכלו לקרוא מידע נוסף על ההוצאה משימוש של 'פעולות שיחה'.
אימות הבקשות
בקשות ל-webhook של השיחה חתומות עם אסימון הרשאה
בכותרת, בפורמט הבא:
google-assistant-signature: "<JWT token>"
אסימון האימות תואם לפורמט JSON Web Token,
כאשר ערך השדה קהל שווה למזהה הפרויקט במסוף Actions.
את האפליקציה. כדי לאמת את החתימה, פורקים את האסימון ומוודאים ששדה הקהל
תואם למזהה הפרויקט של האפליקציה. אפשר לעשות זאת באמצעות מפתח תואם-JWT
ספריית פרטי כניסה, כמו לקוח Google APIs Node.js,
או ישירות באמצעות ספריית הלקוח של Actions on Google Node.js
האפשרות ConversationOptions#verification
, כפי שמוצג בקטע הקוד הבא:
const {conversation} = require('@assistant/conversation');
const app = conversation({verification: 'nodejs-cloud-test-project-1234'});
// HTTP Code 403 will be thrown by default on verification error per request.
הפורמט של JWT יהיה בפורמט הבא:
{
"iss": "https://accounts.google.com"
"aud": [project-id],
"nbf": number,
"iat": number,
"exp": number,
"jti": string
}
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-10-15 (שעון UTC).
[null,null,["עדכון אחרון: 2024-10-15 (שעון UTC)."],[[["Conversational webhook requests include an authorization token in the `google-assistant-signature` header for security purposes."],["This token is a JSON Web Token (JWT) containing an audience field that matches your Actions console project ID, enabling verification."],["You can verify the signature using a JWT library or the `ConversationOptions#verification` setting within the Actions on Google Node.js Client Library."],["The JWT structure includes standard fields like issuer, audience, issue and expiration timestamps, and a unique identifier."]]],[]]