API Authentication
How to authenticate with the Intentra API.
Overview
The Intentra API uses Bearer token authentication.
Getting a Token
Via CLI
intentra auth tokenVia OAuth Device Flow
- POST to
/oauth/device - Display code to user
- Poll
/oauth/tokenuntil 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 refreshExample
const response = await fetch('https://api.intentra.dev/v1/scans', {
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
});