# Asking about discourse invalid\_access

**URL:** <https://meta.discourse.org/t/asking-about-discourse-invalid-access/310237>\
**Category:** Development\
**Created:** [June 2, 2024, 10:12am UTC](https://meta.discourse.org/t/asking-about-discourse-invalid-access/310237 "2024-06-02T10:12:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![wings](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wings/32/331381_2.png) [@wings](https://meta.discourse.org/u/wings)\
**Post date:** [June 2, 2024, 10:12am UTC](https://meta.discourse.org/t/asking-about-discourse-invalid-access/310237/1 "2024-06-02T10:12:20Z")

</div>

Hi,

I would like to ask about the issue of invalid access due to cookies in Discourse. In my case, I am trying to access the Discourse API using a cookie obtained from `/session.json` after logging in.

However, I encounter a problem where, after one or two days, Discourse returns an `Invalid Access` error when using the same cookie that was generated from login (Note: In my case, the cookie updates when the Discourse API returns a header with the `Set-Cookie` value `_t=` ). When I check the cookie, the expiration time is still more than a month away (e.g., `expires=Tue, 30 Jul 2024 04:04:28 GMT`). Additionally, I can see the token I used for login still present in the `user_auth_tokens` database table.

I would like to know the possible reasons why Discourse might invalidate this token. Are there any specific steps or flags in the database discourse that indicate a token has been declared invalid?

Additional info (I used latest discourse version 3.3.0.beta3-dev)

Thank you.

---

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