Is there a way to get google id token or google access token in a google action?

dialogflow
google-assistant

#1

Hello everyone,
I am using Jovo to create a google assistant app that makes request to a backend API to get personalized content, therefore the user must be authorized.
I have explicitly followed this jovo tutorial for account linking and the google sign in process is successful in the google assistant app.
With this $request.getAccessToken(), I only get the access token for auth0 and it’s only useful to make requests at https://YOUR_DOMAIN.auth0.com/userinfo .
However, the backend API I am making calls at needs a google access token or a google id token to authenticate the user from the backend API’s side and send me back its own JWT token in order to make success request to the backend API.

Is there a way to get the google id token or the google access token in a google action?
Let me know if you need more information.

Thank you in advance,
S


#2

Hey! You can log this.$request and it should show the full JSON request. You can use this to access the token if available in the request.