Create Access Token
Quadrata SDK API Service: Create Access Token
Create a JWT authentication token for use in the onboarding client components and other API services.
Parameters
Name
Type
Description
apiKey
*
string
Your API Key
options
object
API and Fetch Options
Parameter Options
Name
Type
Description
allowUnsafeClientApiCall
boolean
Allow service to run in client
SDK Configuration
Name
Type
Description
Example
import type { API } from '@quadrata/sdk/types';
import { createAccessToken, QuadrataEnvironment } from '@quadrata/sdk/api';
type ResponseType = API.Services.CreateAccessToken.Response;
const response: ResponseType = await createAccessToken(
{
apiKey: process.env.QUADRATA_API_KEY,
options: {
// not recommended as it exposes your API key
allowUnsafeClientApiCall: true,
// optional fetch options
cache: 'no-cache'
}
},
{ environment: QuadrataEnvironment.PRODUCTION }
);
const { data: { accessToken } } = response;
Last updated