From this document i understan dialogflow cx messenger integration supports OAuth 2.0 user authentication.
But i need other kind of auth mechanism. like client (bot) authenticates itself without user interation to connect with dialogflow cx agent.
I found something similar my expectation in microsoft copilot studio called direct line authentication. Is similar kind of web channel authentication available in google especially for dialogflow CX messenger integration.
You’ve correctly identified that Dialogflow CX Messenger primarily focuses on user authentication through OAuth 2.0. You’ve also noted that this is different from how Microsoft Copilot Studio’s Direct Line works, where the bot authenticates itself without needing a user.
Unfortunately, Dialogflow CX Messenger doesn’t have a built-in method for bot-to-agent communication without user interaction, like Direct Line does. The current approach relies on OAuth 2.0, which requires the user to log in and authorize the application.
Since Dialogflow CX Messenger doesn’t have a direct built-in equivalent to Direct Line, here are some alternative approaches you can consider:
Custom Integration with the Detect Intent API: Instead of using Dialogflow CX Messenger, you can create your own custom web interface or server-side application. This application can then use the Dialogflow CX DetectIntent API to interact with your agent. The API uses service account authentication, which allows communication between applications without requiring user involvement. You can refer to the following documents to learn how to use the API to make DetectIntent calls and how to set up credentials using a service account key file:
Service Account Authentication and Custom Payload with Web Messenger: You can use a service account’s JSON key file to generate a JWT access token for Google APIs. This token can be included in the custom payload of the dfMessenger library and passed to your webhook or backend service. The backend or webhook can then extract the authorization header and perform the necessary authentication checks. For more details, refer to the following documents:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.