Skip to main content

Auth

import { Auth } from "sendlix";

The Auth class is the default implementation of the IAuth interface. It is the main entry point for authentication-related operations in the Sendlix SDK.

This Class retrieves the Access Token from the server. If the Access Token is expired, it will automatically refresh the token.

Methods

constructor(apiKey)

Creates a new instance of the Auth class.

Parameters:

NameType
apiKeystring

Example:

import { Auth } from "sendlix";

const auth = new Auth("sk_xxxxxxxxx.xxx");
important

You can manage and create API keys in the Sendlix dashboard. Make sure to keep your API key secure and do not share it publicly.