Switching lights via http command

Hi,
Before the changing of the loging to HA i was using http get to switch lights for example
https://xxx.duckdns.org/api/services/switch/turn_on?api_password=password and {“entity_id”:“switch.ac_off_on”}

But now with the new login i don’t know how to do the same action, can someone help me?

For now you need to use legacy_api

The legacy_api_password auth provider is currently enabled by default, assuming you have an API password configured. This allows using the REST API as before. And it doesn’t matter whether you log into the frontend using the new user system or the legacy_api password. E.g., I use the new user system to log into the frontent, yet the REST API still works using ?api_password=xxx.

See Authentication Providers for more details.