# Bug when using tryghost admin api

**URL:** <https://forum.ghost.org/t/bug-when-using-tryghost-admin-api/41976>\
**Category:** Bugs\
**Created:** [October 17, 2023, 1:35pm UTC](https://forum.ghost.org/t/bug-when-using-tryghost-admin-api/41976 "2023-10-17T13:35:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matija\_Pojatar](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/matija_pojatar/32/26869_2.png) [@Matija\_Pojatar](https://forum.ghost.org/u/Matija_Pojatar)\
**Post date:** [October 17, 2023, 1:35pm UTC](https://forum.ghost.org/t/bug-when-using-tryghost-admin-api/41976/1 "2023-10-17T13:35:44Z")

</div>

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

```auto
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’,

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [January 15, 2024, 1:36pm UTC](https://forum.ghost.org/t/bug-when-using-tryghost-admin-api/41976/2 "2024-01-15T13:36:06Z")

</div>

Closed on January 15, 2024, 1:36pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
