Overview
The Occupop API allows developers to integrate their applications with the Occupop platform, providing access to a variety of features including job listing, candidate management, and reporting. This guide will help you get started with using the API effectively.
To interact with the Occupop API securely, you need to generate public and private tokens.
Follow these steps to generate the tokens within the Occupop system:
Note that only admins have the permission to view and generate tokens.
Public Tokens versus Private Tokens
Public Tokens: These tokens are generally used for accessing public data or for actions that do not require elevated privileges, such as listing live jobs in your site and post candidates from there.
Private Tokens: These tokens provide access to private data and allow for more sensitive operations, such as listing candidates, closed jobs and more. They should be kept secure and only used in server-side applications to ensure the safety and integrity of your data.
Step 1: Go to the API Settings page on Occupop
Open your web browser and log in to Occupop. Once logged in, go to Settings > API Settings.
Step 2: Generate a New Token
On the API Settings page, you will find basic information and a list of your current generated and active API Tokens.
To generate a new one, click the "Create token" button. Enter a basic description (label or name) and confirm. The new token will appear last on the list.
Step 3: Store the Tokens Securely
Copy the public and private tokens to a secure location. Do not share the private token with anyone who should not have access. It is recommended to store these tokens in a secure environment variable or a secrets management tool.
Step 4: Use the tokens in API requests
When making API requests to Occupop, include the public/private token in the request Authorization header as specified in the Occupop API documentation.
Keep in mind: Public tokens are useful for sites that consume live job listings, post candidates to Occupop, and provide other public access to your company jobs. Private tokens are useful for integrating Occupop with third-party systems, job boards, and other restricted access applications.
Example of an HTTP request with tokens:
GET /rest/jobs Host: api.occupop.com Authorization: <your_public_or_private_token>
Step 5: Rotate Tokens Periodically
For security reasons, it is good practice to rotate your tokens periodically. Follow the same steps to generate new tokens and update your applications to use the new tokens.
Conclusion
By following these steps, you can securely generate and manage public and private tokens within the Occupop system, ensuring secure and efficient interactions with the Occupop API.