From f1969fc39b0a89fd6dbb93a5949ff7de9d19826a Mon Sep 17 00:00:00 2001 From: Hugo <hnouts.dev@gmail.com> Date: Thu, 7 Jan 2021 11:20:23 +0100 Subject: [PATCH] fixed pce_id typo --- docs/ecolyo/konnectors/enedis.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/ecolyo/konnectors/enedis.md b/docs/ecolyo/konnectors/enedis.md index 34669c2..b3db55b 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 -- GitLab