Skip to main content

Authentication

🔐 Authentication & Identity (IdP)

This section covers how to authenticate with the DataGOL platform and manage service accounts for automated access.

Authentication Overview

1

User Login (JWT)

Authenticate with email/password to get JWT token
2

Service Account

Create or manage service account tokens
3

Data Access

Use service token to access data APIs

User Authentication (IdP)

To interact with the API, you first need to obtain a JWT (JSON Web Token) by logging in with your user credentials.

Authenticates a user and returns a session token. Use this token for all subsequent Identity (IdP) requests.

Request Body

{
"email": "<your-email>",
"password": "<your-password>"
}

Response

Success: Returns Authorization: Bearer <JWT> header
📝 Note: Extract only the token value (remove "Bearer " prefix) for use in subsequent headers.

Try it out

POSThttps://be.datagol.ai/idp/api/v1/user/login
Request Body (JSON)

Service Account Management (IdP)

Service accounts allow automated systems to interact with DataGOL without requiring interactive user login.

Authentication Required

All IdP endpoints require the JWT token from login: Authorization: Bearer &lt;JWT&gt;

Create Service Account

Request Body

{
"name": "<service-account-name>",
"description": "<optional-description>"
}

Response Example

{
"token": "<service-account-token>",
"expiryInSeconds": 31536000
}

💾 Save this token! You'll use it as x-auth-token for data APIs.

Reset Service Account Token

Resets the access token for a specific service account. This is useful for rotating credentials or recovering lost tokens.

Query Parameters

  • neverExpires (optional): Set to true for non-expiring tokens. Default is false.

Response Examples

With Expiry
{
"token": "<new-token>",
"expiryInSeconds": 31536000,
"expiryDate": "2026-08-05T15:19:01.851+0000"
}
Non-Expiring
{
"token": "<new-token>",
"neverExpires": true
}

Try it out

GEThttps://be.datagol.ai/idp/api/v1/company/serviceAccount/:id/token/reset

Delete Service Account

Response: 200 OK with empty body on success

Was this helpful?