Reputation: 126
I tried using the inbuild inline code editor, (https://www.npmjs.com/package/actions-on-google) with that I am able to get the device id and other attributes like location etc. Using dialogflow npm library (https://www.npmjs.com/package/dialogflow) i cant able to get the google home device id.
I tried a sample and added here, which is on inline code editor from dialogflow (https://github.com/AshwinAchu10/google-home-location)
I want to know if there is a way to get the device id from using the Dialogflow npm library. I hardly believe there should be a API to request permission and get the device id
Any idea on how to do this?
Our primary target is to order food using Google home, in that case, we need to fetch the google home unique id and its location.
Upvotes: 0
Views: 84
Reputation: 11968
There is no way to get the individual device ID that is making the request. If you want to support food ordering, you should use the appropriate APIs to do location requesting.
Upvotes: 1
Reputation: 3241
The reason why you are unable to retrieve the Google Home device ID using the Dialogflow npm package is because, the Dialogflow package is intended for building chatbots for any kind if integration using Dialogflow, so it doesn't support features that are specific to Google Assistant. If you wish to create any Actions specifically for Google Assistant or use properies in code for the Google Assistant it is recommended to use the actions on google package.
The actions on google npm package contains a dialogflow integration, so this makes it possible to easily use the actions on google npm package together with Dialogflow.
Upvotes: 1