Google Assistant Integration with Access Token

Ah thankyou! Im on the latest 0.83.3

Where do you place the long lived access token? Been trying to do this with webhooks and canā€™t find the solution, as IFTTT webhooks have no Headers field

The IFTTT integration gives you the URL to use with the token

which integration are you using? IĀ“m using google assistant with webhooks, and thereā€™s no place to use the tokenā€¦

Thanks for the quick reply

I donā€™t understandā€¦ If you are using IFTTT and Google Assistant itā€™s nothing to do with HA anywayā€¦ If you are using GA to control IFTTT then you will need to have the HA webhook in the actionā€¦

I just tried adding the IFTTT integration and it wonā€™t add it (Iā€™m on beta 0.84)ā€¦ Not sure why. I thought it gave you a webhook with the IFTTT token and a json exampleā€¦

Sry, I didnā€™t explain what I was trying to achieve. Iā€™m trying to call a script on HA with GA, and Iā€™m using IFTTT for that, with the GA applet and the webhooks trigger to send the request to the HA API.

The problem is that IFTTTā€™s webhook trigger has no Headers field, thus I cannot authenticate my request against HA

I donā€™t understandā€¦ I just got the integration to workā€¦
image

Then at IFTTT

So you enter the URL and then JSON for the service and parametersā€¦ Does that not work?

Now I got it! I wasnā€™t aware there was an IFTTT component, silly me xb Before the ā€œnewā€ authentication mechanism in HA i used to call the scripts through HA REST api with HTTP basic auth, and only recently upgraded to the HA latest version. Guess IĀ“ll have to try this way. Thanks for your help :wink:

OKā€¦ thatā€™s what I meant by adding the IFTTT integration!

My bad ;b I thought you were talking about a HA Applet on IFTTT xb been around this issue for too long, time to disconnect for now. Thanks again

1 Like

This thread seems to have taken a turn to IFTTT, but Iā€™m stuck on the Access Token for integrating Google device sensors into HA. Everything else is connected and working - I can see my HA devices in the Google Home app and devices respond to voice requests as expected, but this token field has me stumped. Where do I get the token from? From Google? From Home Assistant? Is it a Long Lived Token?

Is ā€˜https://myservername.duckdns.org:8123/api/google_assistant?[long lived token from HA here]ā€™ not correct? What am I missing?

@zgadson found a solution?

Sadly no. Iā€™ve tried and failed many times with information provided at the beginning of this thread, and Google search results offer very little information. :confused:

Iā€™ve come a long way with python in just a few days and was able to run the script. It appears to be working, but debug log shows itā€™s failing at device_id. Why?

# Optional Overrides (Set to None to ignore)
device_id = None
master_token = None
access_token = None
[*] Getting master token...
[!] Could not get master token.
[*] Master token: None

[*] Getting access token...
[!] Could not get access token.
[*] Access token: None

[*] Done.
PS C:\Users\admin\Desktop> 

I tried a lot. get latest python v3.12.0 installed. run pip install gpsoauth - Ok. copy text of get_tokens.py raw text, saved to my pc. Change username to my google username full email address. password section, tried with app password generated by Google security. (note: it is 16 chars. google displayed with 4 sets with space in between. I tried with space or without). Even I turned off google 2 way auth method, so I can use my google password instead. I always get ā€œCould not get master tokenā€, ā€œMaster token:Noneā€ , ā€œCould not get access tokenā€, ā€œAccess token:Noneā€ donā€™t know why? Anyone can help?

any success? as posted by @zgadson I get nothing found when I run the docker version and I get an error when I try the scripts. get_tokens.py or glocaltokens

the error is
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)