Creates an instance of TokenManager.
const tokenManager = new TokenManager({clientId, clientSecret, orgId});
The Service App credentials, organization, storage, and logger.
The base URL for the API. Defaults to PRODUCTION_BASE_URL.
Get the stored Service App token pair. Refresh an expired access token first.
const authorization = await tokenManager.getServiceAppToken();
Retrieve a new service app token using the service app owner's personal access token(PAT).
await tokenManager.getServiceAppTokenUsingPAT('personal-access-token');
The service app owner's personal access token or token from an integration that has the scope spark:applications_token.
Save the service app registration using the provided refresh token. After saving, it can be fetched by using the getServiceAppToken method.
await tokenManager.saveServiceAppRegistrationData('refresh-token');
The refresh token.
The token manager for the BYoDS SDK.