Skip to Content
API ReferenceAuthentication

API Authentication

How to authenticate with the Intentra API.

Overview

The Intentra API uses Bearer token authentication.

Getting a Token

Via CLI

intentra auth token

Via OAuth Device Flow

  1. POST to /oauth/device
  2. Display code to user
  3. Poll /oauth/token until authorized

Using the Token

Include in the Authorization header:

curl -X GET https://api.intentra.dev/v1/scans \ -H "Authorization: Bearer YOUR_TOKEN"

Token Expiration

Tokens expire after 24 hours. Refresh using:

intentra auth refresh

Example

const response = await fetch('https://api.intentra.dev/v1/scans', { headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } });