SeveraApiClient is a third party Severa API client for NodeJS. It is a wrapper around an API client that has been automatically generated using the OpenAPI schema provided by Severa.
Add to project's package.json:
npm install @rantalainen/severa-api-client
const SeveraApiClient = require('@rantalainen/example-api-client').SeveraApiClient;
Severa REST API credentials can be obtained from Severa. More information here
const severa = new SeveraApiClient(
{
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
scope: ['users:read', 'activities:read']
}
);
// Access token needs to be manually fetched/refreshed before making any scoped requests.
await severa.refreshAccessToken();
Available methods can be found in the API documentation.