How to get user information without client library in API.AI webhook?

445 views Asked by At

I'm developing a simple app with Google Assistant and API.AI. I would like to get access to user's location. According to documentation, I have to ask for a permission. But the documentation states it's only possible with a NodeJS client library. My webhook is in Java, can I do that somehow?

2

There are 2 answers

0
Patrick Jackson On BEST ANSWER

Now there is an Unofficial Kolin/Java SDK for actions on google which will do everything that the offical SDK can do. The api is very similar, so the official examples and docs can assist you.
https://github.com/TicketmasterMobileStudio/actions-on-google-kotlin

5
Leon Nicholls On

The Actions on Google client library for Node.js is a wrapper for the Actions Conversation Protocol: https://developers.google.com/actions/reference/conversation

For Java, you are free to implement support for the protocol in your code. Its mostly about accepting JSON payloads for your action and then creating a JSON response. Since the Node.js client library is open sourced, you should be able to figure out the logic that you need for your Java webhook.