Skip to main content
You can find your API key in the absentify Dashboard. Keep this key private to ensure the security of your account.
Do not share your API key in public areas, such as GitHub repositories, client-side code, or anywhere it might be exposed to unauthorized users.
The absentify API supports three ways to authenticate a request:
  1. API key — passed as the x-api-key header or as the apiKey / api_key query parameter.
  2. Bearer token (Microsoft Entra ID) — a signed Microsoft Entra ID JSON Web Token (JWT) passed as Authorization: Bearer <token>. This is the method used by the absentify Power Automate connector.
  3. Bearer value (API key) — an API key passed as Authorization: Bearer <api-key> for clients that only support Bearer-style authentication.
If an explicit API key is present (header or query), it is always used. Otherwise, absentify inspects the value of the Authorization: Bearer ... header. A JWT-shaped value is validated as a Microsoft Entra ID token; any other value is treated as an API key. If your API key is ever compromised, you can regenerate it in the absentify Dashboard to secure your account data.

API key

Include your API key as the x-api-key header on every request. Examples in multiple languages are shown below.

Explanation

  1. Set up the API URL: Define the API endpoint you want to access.
  2. Add headers: Include your x-api-key and set Content-Type to “application/json”.
  3. Send the request: Execute the request and process the JSON response.
Replace "https://api.absentify.com/api/v1/example_endpoint" with the specific API endpoint you need, and "your_api_key_here" with your actual API key.

Bearer token (Microsoft Entra ID)

The API also accepts a Microsoft Entra ID (Azure AD) token in the Authorization: Bearer <token> header. This path is designed for the absentify Power Automate connector, which passes the signed-in user’s Microsoft identity token automatically. No API key needs to be stored in the connector configuration. When a Bearer token is validated, the request runs in the context of the absentify member linked to the Microsoft user who issued the token. Requirements for the token:
  • Signed by Microsoft Entra ID and issued via the AAD v1 endpoint (https://sts.windows.net/<tenant-id>/).
  • Audience (aud) set to the absentify Power Automate app (4dce2abf-3f8e-4281-9f7a-d602fc391886 or api://4dce2abf-3f8e-4281-9f7a-d602fc391886).
  • Contains a valid tenant id (tid) and object id (oid).
The Microsoft user must have signed in to absentify at least once before Bearer token authentication can be used. The sign-in links the Microsoft object id to an absentify account — without this link, the request is rejected with a 401 Unauthorized.
If a Bearer value is not a JWT, the API treats it as an API key. This lets clients that only support Authorization: Bearer ... continue to work with a standard absentify API key.

Example request

bearer_example.sh