# Using Discourse API to return user data when the "Require authentication to read content on this site, disallow anonymous access." setting is checked

**URL:** <https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404>\
**Category:** Bug\
**Tags:** rest-api\
**Created:** [06.Май.2015 22:11:49 UTC](https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404 "2015-05-06T22:11:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![asko](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@asko](https://meta.discourse.org/u/asko)\
**Post date:** [11.Май.2015 14:44:16 UTC](https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404/4 "2015-05-11T14:44:16Z")

</div>

Thanks for getting back to me @riking. I’ve been authenticating for the log out call, since it’s a POST request so I can send the api\_key and api\_username in the request body. Since this call (/users/by-external/{EXTERNAL\_ID}.json) is a GET request, it doesn’t make sense to send those in the request body. I tried sending them as a header in the GET request but it wasn’t working. Does this sound like it might be a bug?

---

_[View the full topic](https://meta.discourse.org/t/using-discourse-api-to-return-user-data-when-the-require-authentication-to-read-content-on-this-site-disallow-anonymous-access-setting-is-checked/28404)._
