Authentication

Authentication

Overview

flaikConnect uses OAuth2 Client Credentials flow for secure, server-to-server authentication. This approach ensures that API access is properly authorized while maintaining the security standards required for handling sensitive employee and lesson data.

Why OAuth2 Client Credentials?

Business Context: Unlike user-facing authentication (where individuals log in), flaikConnect is designed for system-to-system integration. Your HRIS, reporting tools, or custom applications need to authenticate as trusted systems rather than individual users.

Technical Benefits:

  • Secure: No user credentials stored in your applications

  • Scalable: Single set of credentials for your entire integration

  • Auditable: All API calls are traceable to your client application

  • Time-limited: Tokens expire automatically for enhanced security

Getting Your Credentials

Your flaik representative will provide you with:

  • Client ID: Public identifier for your application

  • Client Secret: Private key for authentication (keep secure!)

  • Auth URL: OAuth2 token endpoint for your environment

  • API URL: Base URL for all API calls

  • Scopes: Permissions granted to your integration

Example Scope Permissions

Scope
Access Level
Description

flaik.connect.api.read

Read Only

Retrieve data from all flaikConnect endpoints

flaik.connect.api.write

Read + Write

Full access including employee updates and data uploads

Your assigned scopes depend on your integration requirements and will be configured during setup.

Authentication Flow

1. Request an Access Token

Make a POST request to your OAuth2 token endpoint:

2. Parse the Token Response

Successful authentication returns:

3. Use the Token for API Calls

Include the access token in the Authorization header for all API requests:

Code Examples

Python

Token Management

Token Expiration

  • Access tokens typically expire after 10 minutes (600 seconds)

  • Always check the expires_in value in the response

  • Request a new token before the current one expires

Error Handling

Sample Error Response

Testing Your Authentication

1. Health Check

Once you have a valid token, test API connectivity:

Expected response:

2. Resort Information

Verify your permissions with a simple data request:

This should return your resort's basic configuration data.


Having authentication issues? Contact [email protected] ith the specific error messages.

Last updated

Was this helpful?