Bearer Token Authentication
Authenticate requests using Bearer tokens for server-to-server communication.
GET
/v2/authentication/bearer-token-authenticationRequires authenticationCode Example
typescript
import { NexusClient } from '@nexus/sdk'
const client = new NexusClient({
apiKey: process.env.NEXUS_API_KEY,
})
// All subsequent requests include the Bearer token
const response = await client.request('/v2/resources', {
method: 'GET',
headers: {
'Authorization': `Bearer ${client.getAccessToken()}`,
},
})
// Token refresh is handled automatically
// To manually refresh:
await client.auth.refreshToken()Last updated: April 21, 2026typescript