diff --git a/docs/ecolyo/konnectors/enedis.md b/docs/ecolyo/konnectors/enedis.md index 34669c2102edad427059faadd7e44a7ab416928e..b3db55bd8f665a6ea91cd8aa46bd7b32edb2115d 100644 --- a/docs/ecolyo/konnectors/enedis.md +++ b/docs/ecolyo/konnectors/enedis.md @@ -19,15 +19,11 @@ On its first launch, following the Oauth Client Connect authentification. - The account has now an access_token and an id_token from the oauth call !!! info "" -id*token is only given when requesting the token endpoint in \_authorization_code* grant_type. -This token holds several meta datas, including the pce_id (id of user's meter) that will be needed further to fetch user's datas. + id token is only given when requesting the token endpoint in \_authorization_code grant_type. + This token holds several meta datas, including the usage_point_id (id of user's meter) that will be needed further to fetch user's datas. -- Konnector starts, fails to find a pce_id in database on first launch therefore decodes the id_token to store the pce_id in db (see [addData](https://docs.cozy.io/en/cozy-konnector-libs/api/#adddata_1)). -- Konnector restarts, this time knowing a pce_id, it fails to fetch datas because the access_token from oauth call has a reduced scope (only scoping for meta data requests). -- Konnector launches a refresh call, the proxy knows to answer it with a _client_credentials_ grant_type call to grdf /access_token. -- Konnector restarts with everyting needed in database to fetch datas and store them in couchdb. - -- Further jobs will not need to change scope again and will only ask for refresh tokens. +- Konnector starts, if no usage_point_id are found in database or fields then proceed as a first launch. Store the usage_point_id in oauth_callback_result in db (see [addData](https://docs.cozy.io/en/cozy-konnector-libs/api/#adddata_1)). +- Konnector finds usage_point_id when starting but token is expired. Proceed to refresh token and restart konnector with usage_point_id in fields params (see *Troubleshooting when asking for refresh token* section at the end of the page). ## Enedis API