SDK Authentication with Service Token

This guide shows how to authenticate the Onboardbase JS SDK using Service Tokens

You can also authenticate your Onboardbase SDK with a Service Token; you can read more about Service Tokens here.

To create a new Service Token, click on your profile avatar on the top right. Select Manage Your Organization from the drop-down:

On the Organization settings page, scroll down to the Service Tokens section and click on Create a Token

A modal shows for you to create a Service Token. Fill in the fields according to your use case, then click on Generate to create the Service Token:

Click on the name of the Service Token to copy it:

Integrate Onboardbase JS SDK

After generating the Service Token, you can use it to authenticate the JavaScript SDK as follows:

import { Secrets } from "@onboardbase/secrets";

  serviceToken: <Service Token Goes Here>,
  .then(() => console.log(process.env))
  .catch((err) => console.log(err))

You can then access individual secrets using theprocess.env.SECRET_NAME

console.log(process.env.TEST_SECRET); // -> Secret from onboardbase