# Bad request error

**URL:** <https://community.auth0.com/t/bad-request-error/24568>\
**Category:** Get Help\
**Created:** [April 29, 2019, 11:43am UTC](https://community.auth0.com/t/bad-request-error/24568 "2019-04-29T11:43:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rashid779939](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashid779939/32/27027_2.png) [@rashid779939](https://community.auth0.com/u/rashid779939)\
**Post date:** [April 29, 2019, 11:43am UTC](https://community.auth0.com/t/bad-request-error/24568/1 "2019-04-29T11:43:24Z")

</div>

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" }”)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 29, 2019, 1:12pm UTC](https://community.auth0.com/t/bad-request-error/24568/3 "2019-04-29T13:12:22Z")

</div>

Hey there @rashid779939!

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

```auto
"grant_types": ["client_credentials"]

```

or something alike should do the job!

---

<div class="post-metadata">

**Author:** ![rashid779939](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashid779939/32/27027_2.png) [@rashid779939](https://community.auth0.com/u/rashid779939)\
**Post date:** [April 29, 2019, 1:25pm UTC](https://community.auth0.com/t/bad-request-error/24568/4 "2019-04-29T13:25:00Z")

</div>

I did try multiple alike these but still same error.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 29, 2019, 1:26pm UTC](https://community.auth0.com/t/bad-request-error/24568/5 "2019-04-29T13:26:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 30, 2019, 1:19pm UTC](https://community.auth0.com/t/bad-request-error/24568/6 "2019-04-30T13:19:15Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![rashid779939](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashid779939/32/27027_2.png) [@rashid779939](https://community.auth0.com/u/rashid779939)\
**Post date:** [May 1, 2019, 7:27am UTC](https://community.auth0.com/t/bad-request-error/24568/7 "2019-05-01T07:27:53Z")

</div>

i am using this endpoiny  
https://YOUR\_DOMAIN/api/v2/clients/YOUR\_CLIENT\_ID

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 6, 2019, 12:14pm UTC](https://community.auth0.com/t/bad-request-error/24568/8 "2019-05-06T12:14:14Z")

</div>

Hey!

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!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 16, 2019, 4:52pm UTC](https://community.auth0.com/t/bad-request-error/24568/9 "2019-05-16T16:52:57Z")

</div>

Hey there!

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

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 20, 2019, 1:15pm UTC](https://community.auth0.com/t/bad-request-error/24568/10 "2019-05-20T13:15:26Z")

</div>


