Hi, I'm a bit puzzled... I also get "invalid-token-request" when trying this on the command line. Here is my script: #!/bin/bash export client_id="client_id" export redirect_uri="http://localhost:4200/oauth-callback" export challenge_id=$(cat /proc/sys/kernel/random/uuid) export email="email" export password="password" # Authorize and get code for further request curl -X POST "https://iam.viessmann.com/idp/v2/authorize?client_id=$client_id&redirect_uri=$redirect_uri&response_type=code&code_challenge=$challenge_id&scope=IoT%20User" \ -d "hidden-password=00&stayloggedin=Angemeldet bleiben&submit=Login&isiwebuserid=$email&isiwebpasswd=$password" \ -o login.html export code=$(grep $redirect_uri login.html | sed -E 's/(^.*code=)([^"]*)(.*)/\2/g') # get access token curl -H "Content-Type: application/x-www-form-urlencoded" \ -X POST "https://iam.viessmann.com/idp/v2/token" \ -d "grant_type=authorization_code&code_verifier=$challenge_id&client_id=$client_id&redirect_uri=$redirect_uri&code=$code" \ -o access_token.json Am I missing somehting and cannot see it?
... Mehr anzeigen