cancel
Showing results for 
Search instead for 
Did you mean: 

Observed missing_grant_type error in API response , when application/x-www-form-urlencoded used

Regular Visitor

Observed missing_grant_type error in API response , when application/x-www-form-urlencoded used

Hi,

I want to send a request body to a API method which contains ,
1. client_id :4875dnfdg67586
2. client_secret :3754gfgf
3.grant_type:client_credentials

I have kept media type as "application/x-www-form-urlencoded" and enabled the "Post Query String".

Observed error as missing grant type.

Please refer attached SS.

3 REPLIES 3
Occasional Contributor

Re: Observed missing_grant_type error in API response , when application/x-www-form-urlencoded used

I do have similar problem when I try to get tokeb using Media-Type :  'x-www-form-urlencoded'

and below is my format

grant_type=client_credentials&client_id=123456&client_secret=789000

No Luck.

ITs REST POST CMD withh body of type 'x-www-form-urlencoded'. It works perfect in POSTMAN. 

Would like to know what is the format need to be sent along the body of type 'x-www-form-urlencoded' to get token.

Appreciate quick help

Highlighted
Frequent Visitor

Re: Observed missing_grant_type error in API response , when application/x-www-form-urlencoded used

Format to be sent in request body as ,

 

client_id=1ddd4e5db347a5095f3e25e29c5ddfdgfg4&client_secret=de9fddfdfbfc0035ff08&grant_type=client_credentials

 

Content -Type as - application/x-www-form-urlencoded

Uncheck - Post Query String checkbox

Add headers as ,

Content-Type , application/x-www-form-urlencoded.

 

This will work for sure.

Occasional Contributor

Re: Observed missing_grant_type error in API response , when application/x-www-form-urlencoded used

Works like charm. Thanks @divyarani