Invalid_grant - Invalid, expired, or revoked authorization code.

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
atibbles
User
Posts: 6
Joined: Tue Feb 19, 2019 6:54 am

Invalid_grant - Invalid, expired, or revoked authorization code.

Post by atibbles »

Hi

I am having a problem I think with auth codes expiring when the rest token has expired. I can obtain a new auth code by logging in again but this is not how it should be working.

1: Make a standard GET request to https://rest22.bullhornstaffing.com/res ... porateUser and receive the response
'errorMessageKey' => 'errors.authentication.invalidRestToken', 'origin' => 'proxy', 'errorCode' => 401, 'errorMessage' => 'Bad ''BhRestToken' or timed-out.'

2: I make a POST request to https://rest-emea.bullhornstaffing.com/ ... n=*&ttl=90 to renew the Rest Token and receive the response:
'errorMessage' => 'Invalid or expired OAuth access token.', 'errorMessageKey' => 'errors.internalError', 'errorCode' => 400

3: Make another POST request to https://auth-emea.bullhornstaffing.com/ ... resh_token using the Refresh token to get a new Access Token and receive the response:
'error' => 'invalid_grant', 'error_description' => 'Invalid, expired, or revoked refresh token.'

4: Make another POST request to https://auth-emea.bullhornstaffing.com/ ... ation_code to get a new Refresh token and receive the response:
'error' => 'invalid_grant', 'error_description' => 'Invalid, expired, or revoked authorization code.'

So everything is apparently invalid and the user has to login again with username and password. The same happens regardless of which user it is.

All requests are made using the appropriate tokens, client ids and client secrets parameters.

Am I doing something wrong or is there a setting incorrect on our Corporation? Corp ID 28e1hs
Post Reply