Skip to main content

On-Prem Deployments

If you’re using an on-premises deployment, you can disregard authentication sections and omit authorization headers in requests.

Step 1: Get Your API Key and Secret

To obtain your API key and secret:
1

Log in to Visual Layer

Go to https://app.visual-layer.com and sign in with your user account.
2

Visit the API Credentials Page

You must be authenticated in the browser for this to work. The request depends on your active browser session.

Request

Example Response

You can also run this using curl:

Step 2: Generate JWT Token for Authentication

Use your API key and secret to generate a JWT token, which is required for authenticated API requests.

JWT Token Authentication

JWTs must be included in the Authorization header as a Bearer token type on every request.
These tokens are short-lived and should be regenerated periodically.

Example Python Code

PyJWT is required. Install it with pip install PyJWT.
JWT tokens expire quickly by design. For best security and performance, regenerate tokens periodically based on your security requirements.

Step 3: Test Your JWT Token

After generating your JWT token, you should verify it works by testing it against one of your datasets.

Why Test Your Token?

Testing your token immediately after generation helps you:
  • Verify the token was generated correctly
  • Confirm you have access to your datasets
  • Ensure the token is valid before integrating it into your applications

Test Using curl

You can test your JWT token by retrieving the status of one of your datasets:

Test Using Python

Expected Success Response

If your token is valid, you should receive a 200 OK response with dataset information:

Common Error Responses

Where to find your dataset ID? Your dataset ID is in the browser URL when viewing a dataset: https://app.visual-layer.com/dataset/<dataset_id>/data