By: Elior Kanfi user 27 Dec 2021 at 11:49 p.m. CST

1 Response
Elior Kanfi gravatar
I'm trying to follow [this guide](https://gluu.org/docs/gluu-server/4.2/user-management/scim2/#request-an-access-token-to-the-token-endpoint) to get an access token on test mode. The response I get is: ``` { "error_description": "Client authentication failed (e.g. unknown client, no client authentication included, or unsupported authentication method). The authorization server MAY return an HTTP 401 (Unauthorized) status code to indicate which HTTP authentication schemes are supported. If the client attempted to authenticate via the Authorization request header field, the authorization server MUST respond with an HTTP 401 (Unauthorized) status code, and include the WWW-Authenticate response header field matching the authentication scheme used by the client.", "error": "invalid_client" } ``` my request curl from postman is ``` curl --location --request POST 'https://test.gluu.org/oxauth/restv1/token?grant_type=client_credentials' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Basic ZWxpb3I6ZWxpb3J1ZGk6' ``` I'm not sure I'm doing the encryption correctly. Say my clientId is elior and clientSecret is eliorudi (they are not, but just for the example), what should be the string I need to send in the authorization? I checked the oxAuth log, and it says that for that clientId, the authentication failed: ``` 2021-12-28 05:41:56,866 INFO [qtp222511810-20] [org.gluu.oxauth.auth.Authenticator] (Authenticator.java:226) - Authentication failed for '7c610f8c-92de-432a-9977-5f770699a4e2' ``` Thanks! Elior

By Mohit Mali staff 28 Dec 2021 at 3:19 a.m. CST

Mohit Mali gravatar
Hi Elior Kanfi, can you try ``` curl -u 'Client_ID:Client_Secret' -d grant_type=client_credentials https://<host-name>/oxauth/restv1/token ``` and inform us if you get the same result. Thanks and regards Mohit mali