[ https://issues.apache.org/jira/browse/OLTU-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
sivan closed OLTU-217. ---------------------- Resolution: Fixed Implementation plan is postponed. > Missing parameters error while trying to get the access token. > -------------------------------------------------------------- > > Key: OLTU-217 > URL: https://issues.apache.org/jira/browse/OLTU-217 > Project: Apache Oltu > Issue Type: Question > Components: oauth2-client > Affects Versions: oauth2-1.0.2 > Reporter: sivan > Priority: Blocker > > Hi, > I am using 1.0.2 version of OLTU oAuth client and now the implementation is > blocked due to the below issue. > The grand type is password. I think for this grant type redirect URI is not > required. > Below is the code for getting the access token in the first attempt. > I have tried with both buildBodyMessage() and buildQueryMessage(). > But the error message shows the access token as missing parameter. > Is anything else I need to set in the client request as parameter. > Can you please help me in resolving this issue. > *+{color:red}Error Message{color}+* > invalid_request, Missing parameters: access_token > Stack Trace: > OAuthProblemException{error='invalid_request', description='Missing > parameters: access_token', uri='null', state='null', scope='null', > redirectUri='null', responseStatus=0, parameters={}} > *+Java Code+* > OAuthClientRequest request = > OAuthClientRequest.tokenLocation("https://qa.trustamerica.com/liberty/oauth/token") > > .setGrantType(GrantType.PASSWORD) > > .setClientId("04B13831B0704781BB6FBE6CBD21B014") > > .setClientSecret("90CBA686949C4A7582948D0F852D08F2") > > .setUsername("apienvestnet") > > .setPassword("Integrate17$") > .buildBodyMessage(); > OAuthClient oAuthClient = new OAuthClient(new URLConnectionClient()); > GitHubTokenResponse oAuthResponse = oAuthClient.accessToken(request, > GitHubTokenResponse.class); > Thanks > Sivan -- This message was sent by Atlassian JIRA (v6.4.14#64029)