Forum Discussion

kamahade's avatar
kamahade
Regular Contributor
8 years ago

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

    • kamahade's avatar
      kamahade
      Regular Contributor

      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 ?