Troubleshooting

Start with php artisan bullhorn:test. It says whether the login or the API failed.

Login

Bullhorn config is incomplete

Bullhorn config is incomplete: client_secret, password is empty. One of the four credentials is empty. Check .env, and run php artisan config:clear when the config is cached.

Bullhorn loginInfo returned no oauthUrl and restUrl

Bullhorn loginInfo returned no oauthUrl and restUrl. Check the username. Bullhorn does not know the API username. Check BULLHORN_USERNAME, or set BULLHORN_OAUTH_URL and BULLHORN_REST_URL of your data center to skip loginInfo.

Bullhorn rejected the client id

Bullhorn rejected the client id. The authorize step answered with a page that says the client id is invalid. Check BULLHORN_CLIENT_ID.

Bullhorn returned no authorization code

Bullhorn returned no authorization code. Check the client id, the username and the password, ... The authorize step did not redirect with a code. Usually the username or the password is wrong. It is also what happens when the API user has never logged in to Bullhorn and accepted the terms of service: do that once, in a browser.

Bullhorn OAuth token request failed

Bullhorn OAuth token request failed. HTTP status: 401. The token endpoint refused the client secret (invalid_client) or the code. Check BULLHORN_CLIENT_SECRET. During a renewal this message does not reach you: the client logs in again first.

Bullhorn REST login failed

Bullhorn REST login failed. HTTP status: 400. Response: ... The access token was refused by the REST login, usually because BULLHORN_REST_URL points at another data center than BULLHORN_OAUTH_URL. Empty both to let loginInfo find them.

Login failed

✗ Login failed: ... is how bullhorn:test prints any of the messages above.

Calls

Bullhorn API call failed

Bullhorn API call failed. HTTP status: 400. Response: ... Bullhorn refused the call. The message holds the whole response. For an entity, look at $e->errorKey() and $e->invalidFields(). errors.cannotPersistEntity means one field is wrong and nothing was saved: a string longer than the column (Bullhorn’s customText fields take 100 characters), or a text in a number field.

A 401 here came on a session made a moment ago: the API user lacks the rights for that entity or field.

Bullhorn API call failed. No response

Bullhorn API call failed. No response: cURL error 28 ... The connection failed or timed out; $e->status() is 0. Raise BULLHORN_TIMEOUT for slow calls such as a CV parse. The client does not retry.

Bullhorn request data cannot be sent as JSON

The data holds something json_encode() cannot encode, most often a string that is not UTF-8. Convert it before you send.

Bullhorn paths are relative to the REST URL of the session

You passed a full URL. Pass the part after the corporation’s REST URL, such as entity/Candidate/1.

Ping failed

✗ Ping failed: ... The login worked, the ping did not. Read the message after it.

Session

Bullhorn session cache is not available, the session is kept in memory only

The cache store threw. The client goes on, but every process logs in once. Check the store in BULLHORN_SESSION_CACHE_STORE, or the default store.

Bullhorn FileTokenStore cannot write

A line in the PHP error log that starts with Bullhorn FileTokenStore. The directory is no longer writable for the PHP user, so the session is not kept between requests.

Every request logs in again

The store is not shared. In Laravel: the cache store is array, or BULLHORN_SESSION_CACHE is off. Without Laravel: no FileTokenStore was passed. See How it works.