Skip to content
This repository was archived by the owner on Feb 21, 2023. It is now read-only.
This repository was archived by the owner on Feb 21, 2023. It is now read-only.

solution with Oauth V1 in production  #30

@jluc2808

Description

@jluc2808

hello, i'm not a HA user but i could give you some info which is similar with other integration or other box.
Enedis have implemented the API to let everyone play with the sandbox environment, but only professionnal could access to the production environment.
i will explain: end-user needs to give acknowledge (in french consentement) directly inside his own enedis accompt, this acknowledge is converted in a code send to a professionnal entity which have already signed a contract with Enedis. This contract is needed to allow the professionnal structure to recieve the client_id and client_secret for the real environment (the production one).

So no end-user could use the API authorization (Oauth2), only company is allowed to perform the complete job to recieve access_token and refresh_token.

i did that way for lifedomus box.

I have my own company, i have signed a contract with enedis, publish a web server to establish the dialog with end-user, gave enedis access to test the mecanism, then recieve the 2 client_id and client_secret.
I have published a little Html page which forward the user into enedis step ("consentement"), open on a public server an application to recieve the code generated by enedis (on uri_redirect URL), this URL finalize and use this code to get the token (access_token and refresh_token), then forward the 2 token and the usage_point_id to the end-user application.

Then and only then end-user application could call enedis API with access_token to request for linky data.

Originally posted by @jluc2808 in home-assistant/core#33634 (comment)

I could open my server to accept request for token (and refresh), for that, i need to adjust the way to return access_token, refresh_token, usage_point_id to HA user/program/box. As i don't know the format and the way of the returned data in HA, i need help to understand what is expected and how to send these info to HA programs.
If someone (perhaps @lasconic) could give me this step or how to send info, i then could open the server to request token with Enedis V1 in production. (better to contact me at my email address jean-luc.berno@wanadoo.fr)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions