Anfragen verifizieren (Dialogflow)
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Anfragen an den dialogorientierten Webhook werden mit einem Autorisierungstoken signiert
im Header. Verwenden Sie dabei das folgende Format:
authorization: "<JWT token>"
Das Authentifizierungstoken entspricht dem JSON Web Token-Format,
Dabei entspricht der Wert des Zielgruppenfelds der Projekt-ID der Actions Console für
in der App. Entpacken Sie zum Bestätigen der Signatur das Token und achten Sie darauf, dass das Zielgruppenfeld
mit der Projekt-ID für die App übereinstimmt. Dies kann mit einem JWT-kompatiblen
Anmeldedatenbibliothek wie dem Node.js-Client von Google APIs
oder direkt über die Node.js-Clientbibliothek von Actions on Google
ActionsSdkOptions#verification
-Option.
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.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003eConversational webhook requests are signed with a JWT token in the authorization header for security.\u003c/p\u003e\n"],["\u003cp\u003eThe JWT token's audience field should match your Actions Console project ID for verification.\u003c/p\u003e\n"],["\u003cp\u003eYou can verify the token using JWT libraries or the Actions on Google Node.js Client Library's built-in verification option.\u003c/p\u003e\n"]]],["Requests include an authorization header with a JSON Web Token (JWT). The token's audience field must match the Actions Console project ID. Verify the token's signature using a JWT library or the `ActionsSdkOptions#verification` option in the Actions on Google Node.js Client Library. This can be set using the `actionssdk` method with the project ID. Failure to verify will result in a HTTP 403 error.\n"],null,["# Verifying requests (Dialogflow)\n\nRequests to your conversational webhook are signed with an authorization token\nin the header, using the following format: \n\n authorization: \"\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. This can be done 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[`ActionsSdkOptions#verification`](https://actions-on-google.github.io/actions-on-google-nodejs/interfaces/actionssdk.actionssdkoptions.html#verification) option. \n\n```gdscript\nconst {actionssdk} = require('actions-on-google');\n\nconst app = actionssdk({verification: 'nodejs-cloud-test-project-1234'});\n// HTTP Code 403 will be thrown by default on verification error per request.\n```"]]