Search... K
Appearance
Start building today!
Sign up for API access to receive your API Key and App ID, then start building with the PCRecruiter API.
Get Started!
Appearance
The access-token endpoint is used to create and delete session tokens. The retrieved session token will then be used with an Authorization header as a BEARER token on all subsequent calls.
To create a session token, you can use a POST call to the access-token endpoint with the required parameters. The session token will be present in the response body.
NOTE
The PCRecruiter API requires an App Id and API Key to create an access-token and session with the PCRecruiter API. You can sign up and find more information at these links API Interest Form and Developer API Page
Once a session token has been created, it should be reused for all subsequent API calls within that session. Do not request a new session token for every API call. Creating a new session for each request is unnecessary, adds latency, and consumes additional resources. Instead, store the SessionId token and contunie to include it in the Authorization header of each request until that session is no longer needed or has expired.
A session token will expire automatically after a period of inactivity. The length of this inactivity period is determined by the Global Timeout setting configured in the database. Each successful API call resets the inactivity timer. Once a session has expired, a new session token must be created by calling the access-token endpoint again.
POST /rest/api/access-token
{
"Username": "{Username}",
"Password": "***********",
"DatabaseId": "{DatabaseId}",
"ApiKey":"{API Key}",
"AppId":"{App ID}"
}{
"SessionId": {SessionId here}
}TIP
This API call is to the access-token endpoint and requests an access token which can be used to authorize subsequent API calls to other endpoints.
DELETE /rest/api/access-token
Authorization Header sent with Session Token{
"method": "DELETE",
"url":"https://www2.pcrecruiter.net/rest/api/access-token",
"headers" :{
"Content-Type": "application/json",
"Authorization": "BEARER {SessionId}"
}
}Success: trueTIP
This API call is to the access-token endpoint and is used to remove the active session for the sessionId provided in the DELETE call.