invalid_request in token request

Hi,

I couldn`t get token and got “invalid_request” in the response. does it require any config in the Management Client?

  1. /api/.well-known/uris

Response:

{

“ProductVersion”: “23.3.58.1”,

“UnsecureManagementServer”: “http://win-b9ull6olo7o/”,

“SecureManagementServer”: “https://win-b9ull6olo7o/”,

“IdentityProvider”: “http://win-b9ull6olo7o/IDP”,

“ApiGateways”: [

"[http://win-b9ull6olo7o/API/](http://win-b9ull6olo7o/API/)"

]

}

  1. /api/idp/connect/token

body:

{

“grant_type” : “password”,

“username” : “admin”,

“password” : “XXXXXXX”,

“client_id” : “GrantValidatorClient”

}

Response:

{

“error”: “invalid_request”

}

The user, in your case “admin”, needs to be a basic user created in the Management Client (MC). You can verify that the user can login on the MC. I don’t think this is what you are missing, the error would be something else, likely “invalid_grant”.

I am guessing you are following the description here -https://doc.developer.milestonesys.com/mipvmsapi/api/config-rest/v1/#section/Introduction/Get-started

As far as I can see you are doing it correct, I cannot see if you use

--header “Content-Type: application/x-www-form-urlencoded” \

perhaps you can double check this. This is my primary suspicion. See my setup and use from Postman..

Thank you for your content, yes I had forgotten "x-www-form-urlencoded"