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”}”
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 ?
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
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 &)