Node Apps Toolkit
A collection of helpers and utilities for creating NodeJS Contentful Apps
Getting started
You can install this library via
npm install --save @contentful/node-apps-toolkit
and include it in your code like
const {getManagementToken} = require('@contentful/node-apps-toolkit');
const {appInstallationId, spaceId, privateKey} = require('./some-constants');
getManagementToken(privateKey, {appInstallationId, spaceId})
.then((token) => {
console.log('Here is your app token')
console.log(token)
})
Management tokens are cached internally until until they expire.
Pass reuseToken: false
in the options for getManagementToken
to disable this feature.
API Docs
API documentation is available here
Testing
:warning: Please Note
In order to run integration tests all the environment variables present in
.env.tpl
must be provided.