jonathanraftery / bullhorn-auth-client

Simple client to create Bullhorn REST API sessions with automated OAuth2 login.
1 stars 5 forks source link

Undefined index: Location #5

Open maheshtiu opened 3 years ago

maheshtiu commented 3 years ago

Hello Jonathan,

Thank you for this useful package. I am having an issue, getting the error "Undefined index: Location ", could you please suggest what will be the reason?

image

jonathanraftery commented 3 years ago

The "Location" header should be returned from the Bullhorn API as part of the OAuth login flow, but looks to not be doing so in your case.

Are you certain you're providing valid credentials to the client? Have you also gone through the user consent process for the user account being used?

jonathanraftery commented 3 years ago

Also note that if you're using this to get auth for the Bullhorn REST API, a more robust package with an updated auth client is available at https://github.com/jonathanraftery/bullhorn-rest-client. You could even just use the auth client from that package if you don't want the full REST client.

jonathanraftery commented 3 years ago

Actually I now realize that the OAuth consent process isn't documented anywhere for this package -- only for the full REST client. I suspect the problem is that the account you're using to connect to the API has not granted consent. See https://github.com/jonathanraftery/bullhorn-rest-client#initial-oauth-consent.

maheshtiu commented 3 years ago

Thank you Jonathan, actually not receiving the Location header in the response, we have raised the same issue with the Bullhorn support and waiting for their response.

DavidTurnerDotInfo commented 1 year ago

We ran into a similar issue this week. "Location" is now being returned as "location". We're using the package on 2 different installs one within a WordPress install the other a CodeIgniter app. Haven't been able to identify a change at our end so am presuming it's with BullHorn.

nikola-n commented 1 year ago

Hi all, any update on this issue, it seems that it's a BH issue?

DavidTurnerDotInfo commented 1 year ago

I've added clause that checks for the lower case 'location' too. I'm not sure that is the best approach so haven't submitted the fix. Can do though.

nikola-n commented 1 year ago

I've updated the package to the newer version & the error was gone for me 👍