Bad request error

statusCode":400,“error”:“Bad Request”,“message”:“Payload validation error: ‘Expected type array but found type string’ on property grant_types (A set of grant types that the client is authorized to use).”,“errorCode”:“invalid_body”}
Getting this error when trying to change grant type using managment API.
Settin this body
.body("{ “grant_types”: “client_credentials” }")

Hey there @rashid779939!

Judging by the error message you’ve passed client_credentials as string and expected type is array so changing to:

"grant_types": ["client_credentials"]

or something alike should do the job!

I did try multiple alike these but still same error.

Let me research it then and get back to you with what I find. Can you let me also know which endpoint from Maanagement API you use?

Hey there!

Can you provide me with more context around what you are trying to build?

What parts of our stack you use, what steps you took so I can try to go down the path and track and reproduce the error so as to be able to provide you with a solution? Any info would be much appreciated!

i am using this endpoiny


Ok so that’s the endpoint for getting info about certain application (client of yours). Could you provide me with more context in general around what parts of our stack you use and what you plan to build as of now I’m not sure where the grant types array error might be coming from.

Thanks a lot!

Hey there!

Friendly ping. Let me know if you have any more questions or context to provide!

1 Like