Skip to main content

Key Concepts

  1. Primary OAuth Token: This token is obtained using client credentials and allows the developer to perform actions such as listing and creating organizations.
  2. Organization-Scoped Token: This token is requested using the primary OAuth token and is scoped to a specific organization. It allows the developer to perform actions specific to that organization, such as managing jobs, applications, and users.

Authentication Steps

Step 1: Obtain Primary OAuth Token

First, you need to obtain a primary OAuth token using your client credentials. This token will authenticate you as a developer and allow you to perform developer-specific actions. Request:
POST https://api.recruitifi.com/oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
Response:
{
  "access_token": "PRIMARY_OAUTH_TOKEN",
  "token_type": "bearer",
  "expires_in": 3600
}

Step 2: List Accessible Organizations

Use the primary OAuth token to list the organizations you have access to. This will allow you to see the organizationId values needed for subsequent requests. Request:
GET https://api.recruitifi.com/v1/organizations
Authorization: Bearer PRIMARY_OAUTH_TOKEN
Response:
[
  {
    "id": "organization_1",
    "name": "Organization One",
  },
  {
    "id": "organization_2",
    "name": "Organization Two",
  }
]

Step 3: Request Organization-Scoped Token

Once you have the organizationId, request a scoped token for that specific organization using your primary OAuth token. Request:
POST https://api.recruitifi.com/v1/organizations/{organizationId}/token
Authorization: Bearer PRIMARY_OAUTH_TOKEN
Response:
{
  "access_token": "SCOPED_ORGANIZATION_TOKEN",
  "token_type": "bearer",
  "expires_in": 3600
}

Step 4: Use Organization-Scoped Token

With the Organization-Scoped token, you can now perform actions specific to the organization, such as managing jobs, applications, and users. Example Request to Get Jobs:
GET https://api.recruitifi.com/v1/jobs
Authorization: Bearer SCOPED_ORGANIZATION_TOKEN
Response:
[
  {
    "id": "job_1",
    "title": "Software Engineer",
    "description": "Job description for Software Engineer"
  },
  {
    "id": "job_2",
    "title": "Product Manager",
    "description": "Job description for Product Manager"
  }
]

Summary

By following these steps, you can securely authenticate and interact with the RecruitiFi API. The primary OAuth token allows you to manage organizations, while the Organization-Scoped token ensures that all actions are performed within the context of a specific organization. For more detailed information on each endpoint and additional functionalities, please refer to the subsequent sections of this documentation.