Verify requests
Stay organized with collections
Save and categorize content based on your preferences.
Requests to your conversational webhook are signed with an authorization token
in the header, using the following format:
google-assistant-signature: "<JWT token>"
The auth token follows the JSON Web Token format,
where the audience field value is equal to the Actions console project ID for
the app. To verify the signature, unpack the token and ensure the audience field
matches the project ID for the app. You can do this with a JWT-compatible
credentials library, like the Google APIs Node.js client,
or directly using the Actions on Google Node.js Client Library
ConversationOptions#verification
option, as shown in the following code snippet:
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.
The JWT format will be in this format:
{
"iss": "https://accounts.google.com"
"aud": [project-id],
"nbf": number,
"iat": number,
"exp": number,
"jti": string
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 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."]]],[]]