2

Iam previously using the v1 version of the dialogflow and then they announced that they are going to suspend it.I migrated my code in the cloud functions to the v2. But i could not find a way to integrate it into the ios and android apps. Please help me out. Thanks.

2 Answers2

3

To update your agent to V2, you should create a Cloud Function for Firebase that sends requests to Dialogflow (using dialogflow-nodejs-client-v2), then call that Cloud Function from your iOS or Android code rather than calling the API directly.

The major benefit of this approach is that you will no longer have your API credentials exposed on the client side, which is a security risk.

Daniel Situnayake
  • 2,874
  • 2
  • 30
  • 38
  • 1
    Thanks! I have been going in circles in the documentation trying to figure this out. Ended up using the v1 API directly but now need v2 functionality. – Chris McKnight Oct 01 '18 at 13:40
  • deployed the github code and i did not get any function url to integrate it into my ios(swift) project – kopalli ramya Mar 22 '19 at 08:47
  • is anyone facing the notification issue? Like I am getting Oauth token exposed in notification in my iOS App. How to solve this issue? – Shanu Singh Apr 09 '20 at 07:57
1
  1. You can integrate with Dialogflow API based library and a Java client API. The service account is used for creating credentials for Java client API. Need to click on the service account and get the JSON key generated from the IAM console. The client access token is used for integrating the Android client library Then create a cloud function fulfillment to handle the webhook request. Based on that, an appropriate response will be sent and can be integrated.

  2. Another method is to use tools that offer integration into the Dialogflow. Just need to copy the client key into the dashboard and integrate or add Kommunicate iOS SDK to your app with CocoaPods dependency manager where the SDK comes with pre-configured Dialogflow integration. You'll be also able to customize the chat widget. Please check the following link for more information.

Samir1810
  • 389
  • 1
  • 10