xraver / mercedes_me_api

Script to use Mercedes Me APIs.
MIT License
57 stars 14 forks source link

OAuth flow for Home-Assistant #40

Open Redwid opened 1 year ago

Redwid commented 1 year ago

Why not to implement a proper oauth flow? Home-Assistant has this ability. I've recently set up Nest component: https://www.home-assistant.io/integrations/nest/

See that line on the page: Add Authorized redirect URIs end enter https://my.home-assistant.io/redirect/oauth

Basically on Mercedes console side you need to put callback to your Home-Assistant instance (needs to be public accessible and probably on https), and it will return token to you.

BTW, for some reason URI for me should be https://my.home-assistant.io/auth/external/callback, and not like in documentation.