# נקודת הקצה API users/by-external/ נכשלת עם כותרות הרשאה, עובדת ללא

**URL:** <https://meta.discourse.org/t/api-endpoint-users-by-external-failing-with-authorization-headers-works-without/259885>\
**Category:** Bug\
**Tags:** rest-api\
**Created:** [29 במרץ,‏ 2023,‏ 5:57pm UTC](https://meta.discourse.org/t/api-endpoint-users-by-external-failing-with-authorization-headers-works-without/259885 "2023-03-29T17:57:34Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [26 ביוני,‏ 2023,‏ 9:41pm UTC](https://meta.discourse.org/t/api-endpoint-users-by-external-failing-with-authorization-headers-works-without/259885/15 "2023-06-26T21:41:27Z")

</div>

I looked into this again to see if there was some code that should be changed to improve things, but because the issue only occurred because an “All Users” api key was being used, I don’t think we should change anything code wise. The best option to avoid user deactivation is to use a “Single User” api key so that we can check the last\_used\_at on the api key record instead of trying to check last\_seen\_at on the user record.

---

_[View the full topic](https://meta.discourse.org/t/api-endpoint-users-by-external-failing-with-authorization-headers-works-without/259885)._
