$request.getAccessToken() returns undefined in Google Conversational Actions
See original GitHub issueI’m submitting a…
- Bug report
- Feature request
- Documentation issue or request
- Other… Please describe:
Expected Behavior
In Google Conversational Actions…
const { GoogleAssistant } = require('jovo-platform-googleassistantconv')
after the user has successfully gone through the Account Linking Scene and linked their account, and returned to the ON_SIGN_IN
handler, calling this.$request.getAccessToken()
should return the access token.
Current Behavior
The function GoogleAction.$request.getAccessToken()
is defined, yet it never returns the token, despite the account being linked.
console.log(`this.constructor: '${this.constructor.name}'`)
console.log(`typeof this.$request.getAccessToken: '${typeof this.$request.getAccessToken}'`)
console.log(`this.$request.getAccessToken(): '${this.$request.getAccessToken()}'`)
Error log
This is the output of the code above:
this.constructor: 'GoogleAction'
typeof this.$request.getAccessToken: 'function'
this.$request.getAccessToken(): 'undefined'
Your Environment
$ jovo -v
Jovo CLI Version: 3.2.1
Jovo packages of current project:
jovo-core: 3.3.1
jovo-db-filedb: 3.3.1
jovo-framework: 3.3.1
jovo-platform-alexa: 3.3.1
jovo-platform-googleassistantconv: 3.3.2
jovo-plugin-debugger: 3.3.2
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (8 by maintainers)
Top Results From Across the Web
idToken undefined in result.authentication (authSession with ...
Summary When getting a response back from promptAsync using AuthSession with Google, I get an authentication value with an undefined id_token.
Read more >AppRequest | Dialogflow and legacy Actions SDK
AppRequest is a request sent by the Google Assistant to a fulfillment in order to interact with an Action. The API version is...
Read more >Action on google missing access token - Stack Overflow
According to doc the access token should be in user object but it's not there in my case. Below is request { "requestJson":...
Read more >Google Auth Library: Node.js Client
This is Google's officially supported node.js client library for using OAuth 2.0 authorization and authentication with Google APIs.
Read more >Obtaining Access Tokens using 3-legged OAuth flow
To perform actions on behalf of another user, you'll need to obtain their access tokens. Access tokens specify the Twitter account the request...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having the same Issue. I tried every getter for the access token without any success. I managed to get the token with the following code:
But I think that the problem is inside the
ConversationalActionRequest
. It seems to be expected, that the access token is inside the user but this is not the case for me too.I close this issue due to inactivity.