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"}
While -d uses the application/x-www-form-urlencoded mime-type, generally understood by CGI's and similar, curl also supports the more capable multipart/form-data type. This latter type supports things like file upload.
So i would try to just use a PostMultiPart with an empfy file array giving the map with the data into the fields.
Edit: I interpreted it wrong/just the opposite. Please ignore my answer