# Invalid\_access error

**URL:** <https://meta.discourse.org/t/invalid-access-error/175657>\
**Category:** Product Support\
**Created:** [January 10, 2021, 5:18am UTC](https://meta.discourse.org/t/invalid-access-error/175657 "2021-01-10T05:18:49Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [January 11, 2021, 12:05pm UTC](https://meta.discourse.org/t/invalid-access-error/175657/6 "2021-01-11T12:05:53Z")

</div>

Then you’re not passing the credentials correctly. You can search for examples of how to pass them in the header.

But I just tested this one:

```plaintext
DISCOURSE_API_KEY==API_KEY=
DISCOURSE_API_USER==API_USER=
    curl -s -X GET --header "Api-Key: $DISCOURSE_API_KEY" --header "Api-Username: $DISCOURSE_API_USER" https://example.com/admin/dashboard.json

```

---

_[View the full topic](https://meta.discourse.org/t/invalid-access-error/175657)._
