How to get IFTTT working with new auth

I want to avoid using the legacy password and instead use a long-lived access token. The only way I know of to do this is to add an http header like, “authorization: bearer xxxxxxxxx”, but I don’t know how to do this in IFTTT.

Ok, go into COnfiguration, then Select Integrations, then select IFTTT Configuation. You’ll get the info you need, then go to IFTTT and use the info you get from the configuration like so. (This is one of mine).

2 Likes

what need to be but at “Your Code HERE”?

When you go into configuration, and then integrations and then click on IFTTT, it will provide you a unique webhook ID.

So im not sure where I am having an issue at the moment. I have this automation my config.yaml file. Only difference is I have it at automation old: Since I am using some of the new automatons from the GUI.

I did set up my ifttt integration with my unique ID and i am attempting to run a script that I have set up. I have tested the script so I know it works.

I think it is 1 of 2 things, im not sure if i have the correct json inside the body of IFTTT for my applet to run the script and Im also not sure if the “automation old:” is working or how to possibly build that automation with the new GUI

This is what i have in the body of my applet on IFTTT

{ "action": "call_service", "service": "script.1538381217121" }

It should look something like below. Change turn on to toggle or off:

{ "action": "call_service", "service": "script.turn_on", "entity_id": "script.1538381217121" }

Even though I can go to my developer services and call script.1538381217121 without anything else?

Ill try it:

Yup still nothing, i think it has to do more with my automation not receiving the webhook properly, this is what my automation looks like in my configuration.yaml file looks like

automation old:
  alias: 'Wake on LAN'
  trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
      action: call_service
  action:
    service_template: '{{ trigger.event.data.service }}'
    data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'

Did you get this fixed in the end @asuramin?

I have been pulling my hair out for a while trying to get webhooks working, finally got it working by adding :8123 after duckdns.org !

When you go to Configurations and Integrations for some reason Home Assistant gives you:

https://mydomain.duckdns.org/api/webhook/xxx

but I added the the port number like:

https://mydomain.duckdns.org:8123/api/webhook/xxx

Into the url box on IFTTT.com

I did get it working great. I had to get rid of old automation and import it into the new format to get it to work.

Not working for me,
for example I call { "action": "call_service", "service": "script.vacuum_bathroom" } and it’s not working, with postman i get 405: Method Not Allowed.
I know for sure that calling that script from frontend works
Can you help me please?

I think your code looks wrong. Look at this example

nope, same error.
Is this code need some modifications to work properly?

I copied it as it is and pasted into automations.yaml file and I checked its inclusion into configuration.yaml

I’m not sure what to say. So you have the IFTTT integration set up? And you used that with your IFTTT setup?

and then you set it up like this
How to get IFTTT working with new auth.

So nothing is happening at all?

Ok, actually trying again from IFTTT I get 301 error. I enabled an apache proxy by following this guide to redirect hs traffic on a specific domain like myhome.domain.com and secure it with cloudflare.
Do you have something like this?

Sorry, honestly, I have a super simple setup. Just followed the instructions and it worked for me. I dont have any redirects or anything like that.

Thanks for your patience, I was using http instead of https, DOH! :sob:
In any case your code was a missing piece in my config, big thank you

1 Like

Do you know if this is mandatory to activate the API component with this in the configuration.yaml to make the IFTTT integration work ?

api:

ifttt:
key: key_here

I found the answer: NO you don’t need the API component activated to make this work.

Hello Folks,

I’m going crazy with this setup…

My setup :

  • Raspberry PI 3 with Hass 0.88.2
  • Duckdns enabled and works via 443 and 8123
  • IFTTT API code generated https://xxxx.duckdns.org:8123/api/webhook/xxxxx0f06dcf14492a8125908780b7b0a954243dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Configuration enabled and works.
  • Xiaomi Vacuum added and works from hass dashboard.

My problem is that I can not get to work with IFTTT.

This is how my applet looks :

Body : { "action": "call_service", "service": "vacuum.start", "entity_id": "vacuum.xiaomi_vacuum_cleaner" }

If i access the URL from web browser I get this :

Hope to get some help on this issue, thanks