@goauthentik/api
TypeScript icon, indicating that this package has built-in type declarations

2025.6.3-1751754396 • Public • Published

@goauthentik/api

This package provides a generated API Client for authentik.

Building

See https://docs.goauthentik.io/docs/developer-docs/api/making-schema-changes#building-the-web-client

Consuming

npm install @goauthentik/api --save

Create a configuration:

import { Configuration } from "@goauthentik/api";

export const DEFAULT_CONFIG = new Configuration({
    // Configure where the API is located
    // Can be a full host, ensure CORS is configured
    basePath: "",
    // Required for POST/PUT/DELETE requests
    // getCookie function must return the cookie's contents
    headers: {
        "X-authentik-CSRF": getCookie("authentik_csrf"),
    },
});

Then use the API:

import { CoreApi } from "@goauthentik/api";

const user = await new CoreApi(DEFAULT_CONFIG).coreUsersMeRetrieve();

Readme

Keywords

none

Package Sidebar

Install

npm i @goauthentik/api

Weekly Downloads

12,544

Version

2025.6.3-1751754396

License

none

Unpacked Size

24.5 MB

Total Files

6939

Last publish

Collaborators

  • beryju
  • authentik-bot