# Accessing Member only or Paid member only post by API

**URL:** <https://forum.ghost.org/t/accessing-member-only-or-paid-member-only-post-by-api/16529>\
**Category:** Using Ghost\
**Created:** [August 16, 2020, 2:36pm UTC](https://forum.ghost.org/t/accessing-member-only-or-paid-member-only-post-by-api/16529 "2020-08-16T14:36:56Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![KIT](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kit/32/13448_2.png) [@KIT](https://forum.ghost.org/u/KIT)\
**Post date:** [June 20, 2021, 7:12pm UTC](https://forum.ghost.org/t/accessing-member-only-or-paid-member-only-post-by-api/16529/7 "2021-06-20T19:12:08Z")

</div>

I found a solution by fetching the paid article html and replacing the content section with the response of the Admin API:

[https://github.com/F-Node-Karlsruhe/ghost-iota-pay/blob/main/ghost\_api.py](https://github.com/F-Node-Karlsruhe/ghost-iota-pay/blob/main/ghost_api.py)

To OP: For having a html field in the response the `?formats=html` part in the request url is essential.

`api_url = '%s/ghost/api/v3/admin/posts/slug/%s/?formats=html' % (URL, slug)`

---

_[View the full topic](https://forum.ghost.org/t/accessing-member-only-or-paid-member-only-post-by-api/16529)._
