# Welke scope is nodig om toegang te krijgen tot {{localhost}}/posts.json?

**URL:** <https://meta.discourse.org/t/what-scope-is-needed-for-acessing-localhost-posts-json/180358>\
**Category:** Development\
**Created:** [19 februari 2021 om 16:50 UTC](https://meta.discourse.org/t/what-scope-is-needed-for-acessing-localhost-posts-json/180358 "2021-02-19T16:50:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Hugo\_Tadashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hugo_tadashi/32/210050_2.png) [@Hugo\_Tadashi](https://meta.discourse.org/u/Hugo_Tadashi)\
**Post date:** [19 februari 2021 om 16:50 UTC](https://meta.discourse.org/t/what-scope-is-needed-for-acessing-localhost-posts-json/180358/1 "2021-02-19T16:50:03Z")

</div>

Hi,

I generated an admin-issued API key with `write`, `read` and `read lists` scopes. However, when I try to consume the key (adding the key on the header `Api-Key`) to access the `{{localhost}}/posts.json` endpoint, I get the following error:

```plaintext
    "errors": [
        "You are not permitted to view the requested resource. The API username or key is invalid."
    ],
    "error_type": "invalid_access"
}

```

On the other hand, generating a global key give me access to the endpoint. What is the correct (minimum) scope for reading `{{localhost}}/posts.json`?

---

_[View the full topic](https://meta.discourse.org/t/what-scope-is-needed-for-acessing-localhost-posts-json/180358)._
