nougad / velux-cli

Go Client for Velux Active KIX 300
MIT License
31 stars 3 forks source link

CLIENT_ID & CLIENT_SECRET #2

Closed Lorccan closed 2 years ago

Lorccan commented 2 years ago

This looks perfect for my requirements, so thank you.

I’m probably being stupid, but whilst I know my Velux Active username and password (assuming these are the same used for authentication here), where do the CLIENT_ID and CLIENT_SECRET come from?

Sorry, I’ve realised I need a developer account to get them!

matthiasbaldi commented 2 years ago

From where did you got your CLIENT_ID and CLIENT_SECRET? I took them from my Netatmo DEV account, but it seems that it does not match with the Velux Active stuff, they have an own login/account system.

With the following command curl -v -d "grant_type=password&client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&username=${USERNAME}&password=${PASSWORD}&user_prefix=velux" https://app.velux-active.com/oauth2/token I get only

{"error":"invalid_client"}

as an answer.

Can you tell me what I am doing wrong?

nougad commented 2 years ago

I extracted the keys from the android app as described here: https://community.openhab.org/t/connecting-velux-active-kix-300/75696/11

I don't want to publish them because it might be considered private but this should help https://community.openhab.org/t/connecting-velux-active-kix-300/75696/41

matthiasbaldi commented 2 years ago

Thank you. Helped so much. 👌 I ignored that link to the OpenHab thread because I use NodeRed and tought there are only OpenHab specific things 🤷😂 So, I will test further with that API but it looks pretty good.