I have an appian web api with Oauth 2.0 cliet enabled.But when i am trying to get the token by hitting the token request end point by passing the
grant_type, client_id, client_secret as queryparams and content_type as application/x-www-form-urlencoded.this I am trying from java micro-service, while doing so,I have tried multiple ways like sending them in body , as paramsi am getting the following error :
INFO com.appiancorp.connectedsystems.http.oauth.HttpOAuthTokenRetriever - Error while retrieving token: invalid_client attempting to pass Authentication in body INFO com.appiancorp.connectedsystems.http.oauth.HttpOAuthTokenRetriever - Error while retrieving token using auth in body: invalid_client ERROR com.appiancorp.connectedsystems.http.execution.AppianHttpRequestExecutor - ConnectorRuntimeException [title=Unsupported authentication, This request requires authentication but does not specify the type of authentication expected]
Any leads would be appreciated,Thanks in advance.
Discussion posts and replies are publicly visible
I suggest to first test that API and authentication using a separate API testing tool.
Hi Stefan Helzle ,With API testing tool we are able to fetch the token, by passing client_id,client_secret and grant_type as params and Content-Type : application/x-www-form-urlencoded as header but when we are trying to hit the same token generator end point from micro-services we are getting errors as follows :
1.An unexpected error occurred during OAuth client secret verification: java.lang.IllegalArgumentException: Illegal base64 character 25
2.ERROR com.appiancorp.oauth.inbound.token.OAuthTokenRequestHandler - Error while handling token generation request. Error: com.nimbusds.oauth2.sdk.auth.verifier.InvalidClientException: Bad client secret.
3.ERROR com.appiancorp.connectedsystems.http.execution.AppianHttpRequestExecutor - ConnectorRuntimeException [title=Unsupported authentication, This request requires authentication but does not specify the type of authentication expected]
these are some of the errors we are getting.
as this is appian generated token generator end point, not sure if we need to send any authentication to get the token also, if so how to set the authentication for the same.
You will not get any token without authentication. As this is oAuth, I think this is defined by the protocol. I do not have the required information at hand, but the internet or an AI might be a source.