npm SDK Authentication
The Artos npm SDK sends your Okta access token as a Bearer token on protected API requests.Install
.npmrc first:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Authenticate the Artos npm SDK with an Okta access-token JWT.
npm install @artosai/sdk
.npmrc first:
@artosai:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}
const accessToken = process.env.OKTA_ACCESS_TOKEN
const baseUrl = process.env.ARTOS_API_URL || 'https://api.artosai.com'
import { getTemplateResource } from '@artosai/sdk'
const template = await getTemplateResource({
documentId: 'document-id',
accessToken,
baseUrl
})
console.log(template.templateResourceId)
import { createApiClient, getDocumentSections } from '@artosai/sdk'
const apiClient = createApiClient({ baseUrl })
const result = await getDocumentSections({
documentId: 'document-id',
accessToken,
apiClient
})
Authorization: Bearer <access-token>
| Status | Meaning | Action |
|---|---|---|
401 | The token is missing, invalid, expired, or intended for another API | Obtain a fresh Okta access token |
403 | The token is valid, but the user cannot access the resource | Ask your Artos administrator for access |