API not found

Good morning,

I’m trying to work with the bees to be able to pass the comndi via http giving a command like "http://192.168.1.40:8123/api/services/lights/turn_on?api_password=“My_Password” " only that always this error " 405 : Method Not Allowed ", do you know how to fix?

I would need to be able to control the lights from Google Assistant with IFTTT

You don’t need to use IFTTT if you’re using google assistant.
Anyway, if you want to use IFTTT first of all I guess you need a public IP or URL, like on duckdns, and then in your webhook applet ( https://ifttt.com/maker_webhooks ) you will write something like:

URL: https://yourhassio.duckdns.org/api/services/light/turn_on?api_password=password
METHOD: POST
CONTENT TYPE: application/json
BODY: {“entity_id”: “light.living_room”}

yes, I have NO-IP URL and I would like to be able to give the command not only from Google Assistant in HASS.IO but also with the smartphone

I have some IFTTT Buttons on my smartphone home that I use to send direct commands like opening my house gate when I get home or turning off all the light, without using the HA web front. You just make those IFTTT applets and then you link them to an IFTTT button.

ok, but I wish I could say “turn on lights” and they turn on

In that case, as I said before, you don’t need to use IFTTT. Just set up the Google Assistant component, set up your lights in Home Assistant, add the Home Assistant configuration to your Google Assistant app and then you are done.
After that you’ll have just to say, “Hey Google, turn on the lights”.
Inside the Google Assistant app you can also set the rooms in your house and then you’ll be able to say “Ok google, turn off the lights in the kitchen”