API request error - 02367766

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
mrswebsolutions
User
Posts: 1
Joined: Mon Oct 31, 2016 9:41 am

API request error - 02367766

Post by mrswebsolutions » Fri Nov 04, 2016 12:02 pm

Hi,

i have troubles with my API request to pull ClientCorporation, i keep getting the error:

"error" : "This URL is reserved for login purposes."

Can someone advise please, i use the following location:

https://rest.bullhornstaffing.com/rest- ... n={BHToken}

lokuber
User
Posts: 35
Joined: Wed Jul 20, 2016 5:20 am

Re: API request error

Post by lokuber » Mon Nov 07, 2016 6:27 am

Your error message is pretty straightforward , rest.bullhornstaffing.com is only used to login onto the API.
When you ask for your BhRestToken, you receive an URL to the closest BullHorn server/cluster that you must use for all requests.

MikeCogle
User
Posts: 5
Joined: Mon Sep 12, 2016 10:23 am

Re: API request error

Post by MikeCogle » Mon Nov 07, 2016 11:50 am

Hi Mrswebsolutions,

This is Mike from Bullhorn Support. Lokuber is correct that the rest.bullhornstaffing.com address is only used for logging into the REST API.

Once you're logged in with the access token (this step is noted here: http://developer.bullhorn.com/articles/ ... first_call), you'll generate a "BhRestToken" and a "restUrl". The restUrl determines what URL you should be using to consctruct your query, and the BhRestToken is required to return the data.

For example, if I logged into the REST API and it returned the following:

Code: Select all

{    "BhRestToken": "4f63b538-e49e-4011-xxxx-xxxxxxxxxxxx",
    "restUrl": https://rest23.bullhornstaffing.com/rest-services/123xyz/}
I would construct the above URL to use rest23, so that it's

Code: Select all

https://rest23.bullhornstaffing.com/rest-services/123xyz/entity/ClientCorporation/567/?fields=id,name&BhRestToken=4f63b538-e49e-4011-xxxx-xxxxxxxxxxxx
where "123xyz" is the corpID which was returned, and "567" is the ID of the clientCorporation you would like to return.

I hope this helps moving forward. The rest of the steps for getting started are notated here:
http://developer.bullhorn.com/articles/getting_started

Kind Regards,

Mike Cogle
Bullhorn Support.
Mike Cogle | Bullhorn Support | Senior Enterprise Support Analyst

Post Reply