Skip to content

Client has recently stopped working with "Failed to get Authorization code" (Failed to create rest session) #397

@davidbairdala

Description

@davidbairdala

I am using the Bullhorn Java SDK to retrieve candidate data. Up until this morning I was able to authenticate and execute filter searches by creating a new StandardBullhornData instance.

Now the creation of the StandardBullHornData class fails with an "Unable to create rest client" exception. Looking at the stack trace I can see that the underlying cause is a null pointer exception in RestApiSession.getAuthCode() because a URI being returned from restTemplate.postForLocation() is null. It appears to me that this method (postForLocation) is always expecting a 302 response with a "Location" header, but when I examine the response for the request (the third request in the authentication sequence) the status code is 200, and there is no Location header, resulting in a null pointer exception

It is entirely possible that an infrastructure issue is causing this, but I have no way of telling what is going wrong.

I am using the following URLs:

REST token URL: https://rest-aus.bullhornstaffing.com/oauth/token
REST Authorize URL: https://rest-aus.bullhornstaffing.com/oauth/authorize
REST Login URL: https://rest-aus.bullhornstaffing.com/rest-services/login

I have tested with versions 1.5.47 and 1.4.49 of the SDK, and I have not changed the credentials, client secret or anything else.

It seems to me that at the very least that the SDK should deal with the 200 response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions