Authentication

To use this API, you first need to authenticate and generate an Oauth2 token. The bearer token must be added to the header of all API calls or the request will not be authorized.

Required Credentials

To authenticate you will need the following details:

  • Client ID - the id provided for your organization's authentication.

  • Client Secret - your unique passcode that must be kept private.

  • Token URL - the server you will use to request a token.

  • User name - You may have more than one API user with different roles.

  • Password - Used with your user name to authenticate.

Each authentication request is made using the client ID, client secret, user name and password to request a token from the token URL. The token will expire after 30 minutes and should be refreshed before that happens.

Python Example

from oauthlib.oauth2 import LegacyApplicationClient
from requests_oauthlib import OAuth2Session

client_id = 'login-id'
client_secret = 'f1b5ec25-7a9e-49a9-3102-a062edad24a1'
token_url = 'https://api-auth.skyhive.ai/auth/realms/lhh/protocol/openid-connect/token'
username = 'user'
password = 'password'

def getToken():
    oauth = OAuth2Session(client=LegacyApplicationClient(client_id=client_id))
    token = oauth.fetch_token(token_url=token_url,
        username=username, password=password, client_id=client_id,
        client_secret=client_secret)
    return token

Postman Example

As a SkyHive customer, we will supply a Postman collection and necessary credentials. The following list describes how to configure the Authorization tab of Postman to utilize the collection. Use the following field settings:

After filling in the required fields, click 'Get New Access Token' to generate the token and click 'Use Token' to use it for all subsequent API calls. All APIs in the collection should use the 'Inherit auth from parent' to use the token generated at the collection level.