Error when try to get OAuth Token

Hi everyone,

Does anyone know about “ErrorCode” : “invalid_client”, “Error” :“Client identifier is required”? I tried to retrieve the Token using the command below, but I got this error….

C:\curl-7.33.0-win64-ssl-sspi>curl https://myhost-test.apigee.net/oauth/c

lient_credential/accesstoken?grant_type=client_credentials -X POST -d 'client_id

=LO8DQYmbabuD3g0fi2EWCw96i5hU3dqo&client_secret=IgJlxDL2Yemmbe9w’

{“ErrorCode” : “invalid_client”, “Error” :“Client identifier is required”}'clien

t_secret’ is not recognized as an internal or external command,

operable program or batch file.

I tried to regenerate another Consumer Id and another Client Secret, but continue not working…

Best regards,

Pierre

1 Like

@Marcos Pierre Araujo Piraja Martins

Typically the client_id and client_secret is expected in the Authorization header as a base64 encoded string. So please try modifying your request to this:

curl [https://myhost-test.apigee.net/oauth/c](https://myhost-test.apigee.net/oauth/c)
lient_credential/accesstoken?grant_type=client_credentials -H "Authorization: Basic ${base64EncodedKeySecret}"

The authorization header is base64 encoded string for client_id:client_secret. Please let me know if this works for you.

1 Like