Ask a Question

Client Credentials Grant OAuth 2 access token retrieval for client credentials grant.

kamahade
Regular Contributor

Client Credentials Grant OAuth 2 access token retrieval for client credentials grant.

Hi All,

 

Have anyone got success in getting the OAuth2 tocken ? 

 

I get 400 Bad request error. 

 

I think of 2 reasons

 

1) Its sending the request as URL encoded and it should be application/json. 

 

2) The request itself expecting a company specific parameter and this dialog box does not have any place to add custom specific property.

 

any help ? 

2 REPLIES 2
TanyaYatskovska
Community Manager

Re: Client Credentials Grant OAuth 2 access token retrieval for client credentials grant.

Hi Kamahade,

 

Make sure that you've configured all settings according to this article:

http://readyapi.smartbear.com/features/auth/types/oauth2/intro/authorization

 

If this doesn't help, let us know your settings and more information about he issue you've faced.

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
kamahade
Regular Contributor

Re: Client Credentials Grant OAuth 2 access token retrieval for client credentials grant.

Hi,

Thanks for your reply. I did follow the steps mentioned in the Document. My request(auth Server) expecting an extra argument in the request . 

 

How do I supply extra parameters to the request ? 

 

What I'm sending 

Fri Dec 02 15:23:27 GMT 2016:DEBUG:>> "username=webApp&scope=password&client_secret=webAppsecret&grant_type=password&client_id=webAppId&password=webAppPassword"

 

What I should be sending 

username=webApp&password=webApp&productCode=ABC&grant_type=password&clientId=webApp&clientSecret=webApp

 

the bold parameters in above request is something more the Auth server expecting. However in the Get Token UI dialog, I have no way to pass them.

 

Can you help ? 

cancel
Showing results for 
Search instead for 
Did you mean: