अनुरोधों की पुष्टि करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
बातचीत वाले आपके वेबहुक के अनुरोधों को अनुमति वाले टोकन से साइन किया जाता है
हेडर में, नीचे दिए गए फ़ॉर्मैट का इस्तेमाल करें:
google-assistant-signature: "<JWT token>"
पुष्टि करने वाला टोकन, JSON वेब टोकन फ़ॉर्मैट के हिसाब से होता है,
जहां ऑडियंस फ़ील्ड की वैल्यू, इसके लिए ऐक्शन कंसोल के प्रोजेक्ट आईडी के बराबर हो
ऐप खोलें. हस्ताक्षर की पुष्टि करने के लिए, टोकन को अनपैक करें और पक्का करें कि ऑडियंस के लिए फ़ील्ड मौजूद हो
ऐप्लिकेशन के प्रोजेक्ट आईडी से मेल खाता हो. ऐसा किसी JWT के साथ किया जा सकता है
क्रेडेंशियल लाइब्रेरी, जैसे कि Google API 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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eConversational webhook requests include an authorization token in the \u003ccode\u003egoogle-assistant-signature\u003c/code\u003e header for security purposes.\u003c/p\u003e\n"],["\u003cp\u003eThis token is a JSON Web Token (JWT) containing an audience field that matches your Actions console project ID, enabling verification.\u003c/p\u003e\n"],["\u003cp\u003eYou can verify the signature using a JWT library or the \u003ccode\u003eConversationOptions#verification\u003c/code\u003e setting within the Actions on Google Node.js Client Library.\u003c/p\u003e\n"],["\u003cp\u003eThe JWT structure includes standard fields like issuer, audience, issue and expiration timestamps, and a unique identifier.\u003c/p\u003e\n"]]],[],null,["# Verify requests\n\nRequests to your conversational webhook are signed with an authorization token\nin the header, using the following format: \n\n google-assistant-signature: \"\u003cJWT token\u003e\"\n\nThe auth token follows the [JSON Web Token format](https://tools.ietf.org/html/rfc7519),\nwhere the audience field value is equal to the Actions console project ID for\nthe app. To verify the signature, unpack the token and ensure the audience field\nmatches the project ID for the app. You can do this with a JWT-compatible\ncredentials library, like the [Google APIs Node.js client](https://github.com/google/google-auth-library-nodejs),\nor directly using the Actions on Google Node.js Client Library\n[`ConversationOptions#verification`](https://actions-on-google.github.io/assistant-conversation-nodejs/3.3.0/docs/interfaces/conversation_conversation.conversationv3app.html#verification) option, as shown in the following code snippet: \n\n```gdscript\nconst {conversation} = require('@assistant/conversation');\n\nconst app = conversation({verification: 'nodejs-cloud-test-project-1234'});\n// HTTP Code 403 will be thrown by default on verification error per request.\n```\n\nThe JWT format will be in this format: \n\n```text\n{\n \"iss\": \"https://accounts.google.com\"\n \"aud\": [project-id],\n \"nbf\": number,\n \"iat\": number,\n \"exp\": number,\n \"jti\": string\n}\n```"]]