Getting "invalid_client" when requesting API access token

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
bramfeld
User
Posts: 1
Joined: Thu Sep 10, 2015 6:00 am

Getting "invalid_client" when requesting API access token

Post by bramfeld » Fri Sep 11, 2015 5:29 am

We are unable to get an API access token after trying all methods and possible combinations (with curl, with Postman, with url-encoded parameters, with parameters in the POST body, with redirect_uri, without redirect_uri) and the response is always the same:

"{ "error" : "invalid_client", "error_description" : "Client authentication failed." }"

The CLIENT_ID is right, because the call to authorize works always fine and returns an authentication code that looks like:

5:c5c14bc5-62f7-4d2c-9459-cc582b8afc45

We are sending it exactly like that, either escaped within the URL or unescaped within the POST body to:

https://auth.bullhornstaffing.com/oauth/token

with these arguments:

curl_setopt($ch, CURLOPT_POSTFIELDS, 'grant_type=authorization_code&code=' . $code . '&client_id=' . CLIENT_ID .
'&client_secret=' . CLIENT_SECRET . '&redirect_uri=' . REDIRECT_URI);

the CLIENT_SECRET is exactly as sent to us by Bullhorn and the REDIRECT_URI is the one known to Bullhorn, since they are effectively redirecting the authorization request to it.

Has anyone found such a problem before? We would really appreciate some help on this matter.

Many thanks in advance

Bramfeld

Post Reply