Skip to main content

API Credentials

API Credentials are vital for authenticating with the CELITECH services. They are composed of two parts:

  • Client Id: A unique identifier for the application.
  • Client Secret: A confidential secret key known only to the application and the authorization server.

These credentials can be retrieved from the Dashboard.

Generating a Token

To generate a token using the Client Id and Client Secret, you must make a POST request to the OAuth2 token endpoint.

Request Endpoint

POST https://auth.celitech.net/oauth2/token

Headers

{
"Content-Type": "application/x-www-form-urlencoded"
}

Body

{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"grant_type": "client_credentials"
}

Token Age

The token generated has an expiration time and will become invalid after a certain period (typically 1 hour). Make sure to check the expires_in value in the token response, which indicates the number of seconds the token remains valid.

Refreshing the Token

If the token has expired, it must be refreshed. The process to refresh the token is the same as generating a new one. Simply make a POST request to the same endpoint with the same credentials.

Tokens should be handled securely and should not be exposed to unauthorized parties. Always keep your Client Id and Client Secret confidential.

If you have any further questions, please contact support.