Search code examples
alexa-skills-kitgoogle-homegoogle-smart-home

How to get Access token from Google Smart Home Action?


I'm using the Google Smart Home action and my skill is successfully linked. Getting a below SYNC intent.

{
    "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
    "inputs": [{
      "intent": "action.devices.SYNC"
    }]
}

But not getting the Authorization token to call the cloud api (As we getting in Alexa), So how can I get the Authorization token?


Solution

  • I was able to resolve it by checking the API Gateway logs, I was receiving the access token on api gateway but api gateway was sending only body part to the function not the header.

    So what you need to do is just add the header manually in the request(for your function) and then you will surely receive that access token.