Get an Authentication Token - Authentication (2024)

Get a JWT for API Authentication Using an HTTP POST Request

Connecting to the Dataloop Platform API

Once you have your API Credentials set, you may use it to obtain a JWT for the Dataloop platform.

The Dataloop API uses Auth authentication scheme, where each HTTP request has JWT attached to it via the Authorization header.

Basic Flow

  • Initiate an HTTP request using API Credentials and get your JWT.
  • As long as the JWT is not expired, you can add it as a Bearer authorization header.

Get an Authentication Token - Authentication (1)

Generating a JWT

The request schema is as follows:

POST https://gate.dataloop.ai/token?default
Content-Type: application/json
Body

{ "username": "<user name>", "password": "<user password>", "type": "user_credentials"}

For example using Postman:

Get an Authentication Token - Authentication (2)

Click Send and you'll get a response in the following format:

{ "access_token": "...", "id_token": "...", "refresh_token": "...",}

Use the id_token (JWT) from the response as your authorization JWT for future requests.

JWT Expiration

Once the JWT expires, user should issue a request for a new JWT. Expiration period is 24 hours (but may be updated in the future).
There are many tools and libraries to decode JWTs, for example, https://jwt.io/ allows interactive decoding.

A decoded JWT will look as follows:

{ "name": "Name", "nickname": "Name", "picture": "https://example.com", "locale": "he", "updated_at": "2025-09-23T06:06:17.641Z", "email": "zaphod@dataloop.ai", "email_verified": true, "iss": "https://dataloop-development.auth0.com/", "sub": "google-oauth2|101916523885779176498", "aud": "I44w8", "iat": 1569218779, "exp": 1569283579,}

Note:

  • In order to obtain the expiration date, you will need to decode the JWT. You will also need to extract the exp field to get your JWT lifetime.
  • You will need to refresh your JWT before its expiration date.

Continue to use the JWT for HTTP request to the platform (with bearer authentication)

Get an Authentication Token - Authentication (2024)
Top Articles
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 6514

Rating: 4.1 / 5 (52 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.