Multiple BhRestToken Keys

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
vipultandon
User
Posts: 12
Joined: Mon Jan 21, 2019 6:32 am

Multiple BhRestToken Keys

Post by vipultandon » Fri Jul 05, 2019 2:23 am

Hi Bullhorn Support Team,

Have few queries related to REST API,

1. Is there a way to have multiple BhRestToken Keys for different Development and Production Environments.?

2. When using Entity ClientCorporation via REST API, how should I know whether Corporation is Deleted OR deactivated.
Which field and what value i should consider to get this?

Please have a look and do response.

Regards,
Vipul

lloydevaporate
User
Posts: 10
Joined: Fri May 17, 2019 8:20 am
Contact:

Re: Multiple BhRestToken Keys

Post by lloydevaporate » Fri Jul 12, 2019 3:32 am

Hi,

Seeing as no one has replied figured I'd drop this here.
Is there a way to have multiple BhRestToken Keys for different Development and Production Environments.?
I believe you're misunderstanding the use of RestTokens.
The BhRestToken is created from an access token/auth code through normal sign in or is returned when refreshing using a refresh token.
They have a lifespan of 10 minutes and require a refresh after that time.
I've got some sample PHP code which might help you out. I'll link there >> https://hastebin.com/fatatupaji.php

When using Entity ClientCorporation via REST API, how should I know whether Corporation is Deleted OR deactivated.
Which field and what value i should consider to get this?
Please take a look at this sample return >> https://pastebin.com/zZcwAZyw
I'm not 100% sure however I believe the field you would be looking for would be status.

Code: Select all

// ... entity is json response from API
const active = entity.status == 'Active'; 
// would evaluate to true or false depending on status field. 
// Unsure on the states of this, take a look at the entity reference stuff in the API docs
I hope this information helps but feel free to dm/email me if you have any other questions as I'm still heavily in the middle of Bullhorn integrations.

Post Reply