Hi
i have become a example in cUrl:
curl \
-d "client_id=watch" \
-d "client_secret=....." \
-d "username=[user]" \
-d “scope=openid” \
-d "password=[password]" \
-d "grant_type=password" \
"href="https://......../protocol/openid-connect/token"
I have Test in B4A with:
unfortunately i get a Error: {"error":"invalid_request","error_description":"Invalid grant_type"}
i have become a example in cUrl:
curl \
-d "client_id=watch" \
-d "client_secret=....." \
-d "username=[user]" \
-d “scope=openid” \
-d "password=[password]" \
-d "grant_type=password" \
"href="https://......../protocol/openid-connect/token"
I have Test in B4A with:
B4X:
h_Spot_Token.Initialize("",Me)
h_Spot_Token.PostString(urlSpotV3_Token,$"client_id=watch&client_secret=.........&username=${box_User.Text}&password=${box_Pass.Text}&scope=openid&grant_type=password")"$)
h_Spot_Token.GetRequest.SetHeader("Content-Type", "application/json")
Wait For (h_Spot_Token) JobDone(h_Spot_Token As HttpJob)
If h_Spot_Token.Success = True Then
Log(h_Spot_Token.GetString)
Else
Log(h_Spot_Token.ErrorMessage)
End If
unfortunately i get a Error: {"error":"invalid_request","error_description":"Invalid grant_type"}