diff --git a/main.go b/main.go index e68eb06e64be697f9d397941f1c6075488302134..638b476365db108eab7709d2424311dbd3678fe6 100644 --- a/main.go +++ b/main.go @@ -45,7 +45,7 @@ func main() { redirectUri := "https://oauth-proxy.wf.alpha.grandlyon.com/redirect" responseType := "code" - authReq := "https://gw.hml.api.enedis.fr/dataconnect/v1/oauth2/authorize?client_id="+ clientId +"&duration=P6M&redirect_uri="+ redirectUri +"&response_type="+ responseType +"&state="+ state +"-"+ cozyOrigin + authReq := "https://mon-compte-particulier.enedis.fr/dataconnect/v1/oauth2/authorize?client_id="+ clientId +"&duration=P6M&redirect_uri="+ redirectUri +"&response_type="+ responseType +"&state="+ state +"-"+ cozyOrigin fmt.Println(time.Now().Format("2006-01-02 15:04:05"), "- Send request to auth endpoint", authReq) response, err := http.Get(authReq) @@ -180,7 +180,7 @@ func main() { fmt.Printf("grant_type: %s\n", grantType) fmt.Printf("refresh_token: %s\n", refreshToken) - tokenUrl := "https://gw.hml.api.enedis.fr/v1/oauth2/token" + tokenUrl := "https://gw.prd.api.enedis.fr/v1/oauth2/token" data := url.Values{} data.Set("client_id", clientId)