Admin API keys should remain secret, and therefore this promise-based JavaScript library is designed for server-side usage only. This library handles all the details of generating correctly formed urls and tokens, authenticating and making requests.
url
- API domain, must not end in a trailing slash.key
- string copied from the “Integrations” screen in Ghost Adminversion
- minimum version of the API your code works withurl
and key
values can be obtained by creating a new Custom Integration
under the Integrations screen in Ghost Admin.
yarn add @tryghost/admin-api
npm install @tryghost/admin-api