From d05317c2c7050516f9fc45ee1074d1cab9c912ac Mon Sep 17 00:00:00 2001
From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com>
Date: Wed, 27 May 2020 09:40:55 +0200
Subject: [PATCH] Switch to Enedis PROD API

---
 main.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/main.go b/main.go
index 53d5ede..bb40c34 100644
--- a/main.go
+++ b/main.go
@@ -46,9 +46,9 @@ func main() {
 		responseType := "code" 
 
 		// DEV API
-		authURL := "https://gw.hml.api.enedis.fr/dataconnect/v1/oauth2/authorize"
+		// authURL := "https://gw.hml.api.enedis.fr/dataconnect/v1/oauth2/authorize"
 		// PROD API
-		//authURL := "https://mon-compte-particulier.enedis.fr/dataconnect/v1/oauth2/authorize"
+		authURL := "https://mon-compte-particulier.enedis.fr/dataconnect/v1/oauth2/authorize"
 
 		redirectUrl := authURL +"?client_id="+ clientId +"&duration=P6M&redirect_uri="+ redirectUri +"&response_type="+ responseType +"&state="+ state +"-"+ cozyOrigin
 
@@ -161,9 +161,9 @@ func main() {
 		fmt.Printf("refresh_token: %s\n", refreshToken)
 		
 		// DEV API
-		tokenUrl := "https://gw.hml.api.enedis.fr/v1/oauth2/token"
+		// tokenUrl := "https://gw.hml.api.enedis.fr/v1/oauth2/token"
 		// PROD API
-		// tokenUrl := "https://gw.prd.api.enedis.fr/v1/oauth2/token"
+		tokenUrl := "https://gw.prd.api.enedis.fr/v1/oauth2/token"
 		
 		data := url.Values{}
 		data.Set("client_id", clientId)
-- 
GitLab