Connecting Velux Active KIX 300

I have extracted the client_id and client_secret from the VELUX active 1.5.0.7 APK using JADX. Those two information are returned by some methods, located all in the same class file.

# client_id: 5931426da127d981e76bdd3f
# client_secret: 6ae2d89d15e767ae5c56b456b452d319
# mgtkey: f3748d873c62f30ef6f7b61b7e725ac6

How to get your oauth2 token?

$ curl --location --request POST 'https://app.velux-active.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_id=5931426da127d981e76bdd3f' \
--data-urlencode 'client_secret=6ae2d89d15e767ae5c56b456b452d319' \
--data-urlencode 'username=my@email.com' \
--data-urlencode 'password=mypassw' \
--data-urlencode 'app_version=1108002' \
--data-urlencode 'user_prefix=velux'