Missing a request parameters

Hello, here is my call

and when i try it i got a error message “Raw response for the API
Status code 400
{“error”:“invalid_request”,“error_description”:“The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Request parameter ‘grant_type’ is missing”}”

i tried this call in Postman and it worked

anyone can help ?

The value of “authorization_code” is empty ?

here is the documentation of the call

Grant_type should be a string “Authorizatiob_code” and that what i set in my call.

I don’t undertsant why he said grant_type is missing …

That’s great ! Your parameters look correct, but maybe in your specific call the value of “authorization_code” being set as the “grant_type” is empty ?

what do you mean by “is empty” ?

This means that “authorization_code” in your call has no value

Reason why it’s not working is because you are sending a JSON while API expect x-www-form-urlencoded (like you did in postman)

remove your JSON body, use parameters instead, check the querystring checkbox for each element and add the header for Content-type: application/x-www-form-urlencoded

now it tell’s me “post body can not be empty”

So this is because it won’t read the url encoded with querystring (most api will accept it but not all).
In this case, you need to do that:
Put all your parameters into the body JSON, but instead as json, set it as
grant_type=authorization_code&code=yourcode&… (all key,value pair separated with &)

Another solution is to use the “raw” type instead and uncheck querystring

ok guys, with your helps, i founded the solution


just need to set body type as Form-data

1 Like

All API are differents and could accept different thing. However, the form-data is another type of request. Nice that you found it

This topic was automatically closed after 70 days. New replies are no longer allowed.