BhRestToken Error - 401 Unauthorized

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
datafrenzy
User
Posts: 2
Joined: Tue Apr 07, 2015 12:55 am

BhRestToken Error - 401 Unauthorized

Post by datafrenzy » Tue Apr 07, 2015 1:17 am

Hi,

I am implementing your rest api to get job information. We have multiple accounts that we need to provide service. All the accounts has been registered and provided us required credentials by you. I am following the below steps for each individual accounts :

1) If don't have refresh token - get the authorization code
2) Get the access token by refresh token or authorization code
3) Get the Rest Token
4) Call Rest API to get entity (JobOrder) information

The problem is, It works fine (all four steps mentioned) for one of the account But not for other. The account that is generating error, I am able to get all the credentials (step 1, step 2, step 3), but When I try to get entity information It gives me error (image from Postman call). There is not a problem of token expiration as I am using the token immediately as I receive.
errorBH.png
errorBH.png (23.42 KiB) Viewed 9132 times
It is very urgent for us. Please suggest.

pmularski
Bullhorn Support Staff
Posts: 891
Joined: Wed Dec 31, 1969 8:00 pm

Re: BhRestToken Error - 401 Unauthorized

Post by pmularski » Tue Apr 07, 2015 2:41 pm

Good Afternoon Datafrenzy,

You mentioned that this is occurring for multiple clients. Are you updating the https://rest9 to correctly associate the URL per client? That URL is not universal.
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131

datafrenzy
User
Posts: 2
Joined: Tue Apr 07, 2015 12:55 am

Re: BhRestToken Error - 401 Unauthorized

Post by datafrenzy » Tue Apr 07, 2015 11:48 pm

Hi Pmularski,

Yes, I am using the rest9 url that received with BhRstToken per client. Each cleint gets its own BhRestToken and BhRestUrl.

pmularski
Bullhorn Support Staff
Posts: 891
Joined: Wed Dec 31, 1969 8:00 pm

Re: BhRestToken Error - 401 Unauthorized

Post by pmularski » Wed Apr 08, 2015 8:58 am

Good Morning Datafrenzy,

Ok. That is your problem. Unless those clients all exist on Swimlane 9 in our data system, that URL will not be valid for all of them.

I do not know which clients you are working with, so I cannot tell you what URL you should be using for each of them. In that case, I would suggest either having your clients open a ticket with Bullhorn Support to retrieve the correct URL, or you can try to cycle through https://rest5, rest4, rest3, rest2, or rest for each client.
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131

chrisallport
User
Posts: 1
Joined: Tue Apr 03, 2018 1:45 pm

Re: BhRestToken Error - 401 Unauthorized

Post by chrisallport » Tue Apr 03, 2018 1:52 pm

I know this is an old thread, but I'm having the same problem. My client was on rest9, so I'm making all my calls there. I have cycled through rest, rest2, rest3, etc. up to rest9 and cannot get it to work. But I'm getting the same issue as the OP. I get a resturl and bhRestToken, try to immediately use it, and get a 401. Is there a way for me to get the correct url/swim lane without a support request?

Post Reply