Trying to generate a token in NodeJS via Swagger-Client 400 error

Hello,

I am currently trying to generate a Bearer token in a NodeJS application.
To perform thos requests I am using the Swagger-Client.
My request parameter looks like this:
const tokenRequest = {
url: baseUrl+“api/authorize/access_token”,
method: “post”,
body: {
client_id: “myID”,
client_secret: “mySecret”,
grant_type: “client_credentials”
}
};
When executing I am getting the following error:
"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "grant_type" parameter.", "code": 400
In Postman the request is working fine.

What’s the content-type you’re using? For me ‘application/x-www-form-urlencoded’ works.

Using the content-type did not change a thing for me, but you still gave me an hint.
I ditched the swagger-client for request ,which uses ‘application/x-www-form-urlencoded’ per default. Changing packages basically did it for me.
Thanks for your help.