🌿
Laurel APIs
  • Introduction
  • Guides
    • Authentication
    • Building A Connector
    • Public Api Endpoints
  • Services
    • Identity
      • Oauth
      • Users
    • Ingestion
      • Clients
      • Codes
      • Initiatives
      • Validation Rules
    • Time
      • Clients
      • Code Types
      • Codes
      • Entries
      • Initiatives
      • Validation Rules
Powered by GitBook
On this page
  • Getting Started
  • Retrieving API Credentials
  1. Guides

Authentication

PreviousIntroductionNextBuilding A Connector

Last updated 1 year ago

We use OAuth2 authentication, here's how to retrieve an M2M access token. These tokens can be used with our :

  • Time Service

  • Identity Service

Getting Started

Our team will provide you with the following:

  • Your customerId

  • Your application clientId

  • Your application clientSecret

  • Your regional API endpoint for our Time Service

Retrieving API Credentials

With the clientId and clientSecret you can call our token exchange endpoint to generate an M2M access token.

Here's a sample request:

POST https://identity.laurel.ai/api/v1/oauth/token

{
    "audience": "https://timeautomation.com",
    "grant_type": "client_credentials",
    "client_id": "<clientId>",
    "client_secret": "<clientSecret>"
}
Here's a sample response:

{
    "access_token": "<token>",
    "expires_in": 86400,
    "token_type": "Bearer"
}

The returned token can be used with your specific customerId in Time Service and Identity Service

two public facing APIs