Skip to content

Authentication

The Poli Page Node.js SDK authenticates every request with a bearer token. The key prefix determines which environment the request hits.

Pass the key to the client constructor:

const client = new PoliPage({ apiKey: process.env.POLI_PAGE_API_KEY! });

The SDK never reads process.env.POLI_PAGE_API_KEY implicitly. You always pass the key in.

import { PoliPage } from '@poli-page/sdk';
const client = new PoliPage({
apiKey: process.env.POLI_PAGE_API_KEY!,
});