# Can't retrieve posts with API

**URL:** <https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [February 17, 2023, 8:56am UTC](https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455 "2023-02-17T08:56:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![smejak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smejak/32/293991_2.png) [@smejak](https://meta.discourse.org/u/smejak)\
**Post date:** [February 17, 2023, 8:56am UTC](https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455/1 "2023-02-17T08:56:52Z")

</div>

I am trying to use the Discourse API to create a list of all posts (first posts only) with a specific tag. So far, I’ve only been able to get the latest posts, which retrieves around 40 posts, including comments. When I tried retrieving a specific post id, some of them have worked, but for some I got the response  
`{'errors': ['You are not permitted to view the requested resource.'],'error_type': 'invalid_access'}`  
even though the API key I’m using has admin access to all posts on our Discourse. Has anyone encountered this issue before?

---

_[View the full topic](https://meta.discourse.org/t/cant-retrieve-posts-with-api/255455)._
