@wmendelin
@wmendelin sagte in Vr200 in Iobroker einbinden:
Ich habe ein Problem das Token zu bekommen, ich habe es mir durch anmelden in der My Kobold App senden lassen.
Da ich mit der Curl eingabe nicht klar komme.
Den Satz hatte ich überlesen. Sorry. Also der Name vom VR200 ist OK. Der heisst bei mir auch so.
Das Problem wird der API-Token sein. Mir ist nicht bekannt, dass man aus der App seinen Token generieren lassen oder zusenden lassen kann.
Das ist der Weg, der funktioniert:
####################################################
Getting a token
You can get a token using the following two curl commands:
This will trigger the email sending
curl -X "POST" "https://mykobold.eu.auth0.com/passwordless/start" \
-H 'Content-Type: application/json' \
-d $'{
"send": "code",
"email": "ENTER_YOUR_EMAIL_HERE",
"client_id": "KY4YbVAvtgB7lp8vIbWQ7zLk3hssZlhR",
"connection": "email"
}'
==== wait for the email to be received ====
this will generate a token using the numbers you received via email
replace the value of otp: 123456 with the value you received from the email
curl -X "POST" "https://mykobold.eu.auth0.com/oauth/token" \
-H 'Content-Type: application/json' \
-d $'{
"prompt": "login",
"grant_type": "http://auth0.com/oauth/grant-type/passwordless/otp",
"scope": "openid email profile read:current_user",
"locale": "en",
"otp": "123456",
"source": "vorwerk_auth0",
"platform": "ios",
"audience": "https://mykobold.eu.auth0.com/userinfo",
"username": "ENTER_YOUR_EMAIL_HERE",
"client_id": "KY4YbVAvtgB7lp8vIbWQ7zLk3hssZlhR",
"realm": "email",
"country_code": "DE"
}'
From the output, you want to copy the id_token value.
####################################################