Authentication
Before making any API requests with the node package you need to call setup
with your space ID and api token. Every subsequent request will be authenticated with these credentials.
Take care not to share your API tokens with code. You may want to use environment variables to store tokens.
const spaceID = 123;
const apiToken = "my-api-token";
lingo.setup(spaceId, apiToken);
...
const kits = await lingo.fetchKits()
Starter Project
The starter project (opens in a new tab) also allows you to set your credentials in apiToken.ts
file to easily get up an running. You may eventually need to update this to share code.