Kent Andersen
Kent Andersen

Reputation: 2201

api.ai webhook authentication

I've successfully completed account linking on api.ai, and now I'm trying to execute a webhook. The problem here is that I need the token that was generated during the linking process to go into the authentication field. Otherwise I will always get a "403" error back. How can you change the auth token in the webhook header field dynamically for each user that issues a Google Home voice command?

Upvotes: 2

Views: 814

Answers (1)

Kai G
Kai G

Reputation: 97

For all I know that's not currently possible. I pretty much had the same issue, and I resorted to connecting to an intermediate server that handles the webhook, extracts the access token (available via the actions-on-google node.js API as getUser().access_token), and then forwards the request in the right format to the original host.

Upvotes: 2

Related Questions