Conversational Action AccessToken

account-linking
google-assistant

#1

Hi everyone,

do you know where I can get the access token for my api requests?
It says in the google action docs:

After the user has completed the account linking flow, Google calls your service’s APIs and attaches the access token with each request. Your service verifies that the access token grants Google authorization to access the API and then completes the API call. Google Docs

But even after unlinking and linking again it’s still missing. That’s a part of the request I got from the Google Action. In the Google Docs it says that the accesstoken should be here.

"user": {
  "locale": "en-US",
  "params": {
     "userId": "cfb2 ... f081"
  },
  "accountLinkingStatus": "LINKED",
  "verificationStatus": "VERIFIED",
  "packageEntitlements": [],
  "gaiamint": "",
  "permissions": [],
  "lastSeenTime": "2021-07-06T12:24:38Z"
},

Thanks!


Lambda Function < API Gateway < Conversational Action AccessToken
#2

They changed it. It’s in the request header.

const token =
      this.$host.headers['Authorization'] ||
      this.$host.headers['authorization'];

Not sure if it’s capital case


#3

Hi @AlexSwe

Awesome! It’s the second one, all lowercase.

Thank you!