# Is there an endpoint to check if a user is logged in

**URL:** <https://meta.discourse.org/t/is-there-an-endpoint-to-check-if-a-user-is-logged-in/72780>\
**Category:** Development\
**Created:** [25. Oktober 2017 um 18:26 UTC](https://meta.discourse.org/t/is-there-an-endpoint-to-check-if-a-user-is-logged-in/72780 "2017-10-25T18:26:47Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)\
**Post date:** [25. Oktober 2017 um 20:46 UTC](https://meta.discourse.org/t/is-there-an-endpoint-to-check-if-a-user-is-logged-in/72780/4 "2017-10-25T20:46:24Z")

</div>

You could try `/session/current.json`

It will return `200` if authenticated and `404` if not.

Generally `.json` / API requests don’t redirect.

> <https://github.com/discourse/discourse/blob/main/app/controllers/application_controller.rb#L575-L589>

---

_[View the full topic](https://meta.discourse.org/t/is-there-an-endpoint-to-check-if-a-user-is-logged-in/72780)._
