We have been using ghost admin api as a way to add newsletter subscribers from our main site to our ghost blog site. We have recently noticed that the api started reverting calls. We are using node.js express as a backend. The code in question
require('dotenv').config();
const GhostAdminAPI = require('@tryghost/admin-api');
const { GHOST_API_URL, GHOST_ADMIN_API_KEY } = process.env;
const admin = new GhostAdminAPI({
url: GHOST_API_URL,
key: GHOST_ADMIN_API_KEY,
version: 'v5.68',
});
@tryghost/admin-api version is 1.13.8.
Both GHOST_API_URL and GHOST_ADMIN_API_KEY have been copied from the setting page of our ghost blog with a custom integration.
the call that revers:
const ghostResponse = await admin.members.add({ email });
the error:
context: ‘You do not have permission to add members’,
type: ‘NoPermissionError’,