# Request from API doesn't update User#last\_seen\_at

**URL:** <https://meta.discourse.org/t/request-from-api-doesnt-update-user-last-seen-at/108528>\
**Category:** Product Support\
**Created:** [February 6, 2019, 7:56pm UTC](https://meta.discourse.org/t/request-from-api-doesnt-update-user-last-seen-at/108528 "2019-02-06T19:56:10Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [February 7, 2019, 9:36am UTC](https://meta.discourse.org/t/request-from-api-doesnt-update-user-last-seen-at/108528/4 "2019-02-07T09:36:54Z")

</div>

> [@jandres](#):
>
> It exist any endpoint to update the user visits?

No, there isn’t one. If you have control over the API server you could try and “trick” discourse into updating last seen for the request. From the code I quoted above you can see how it works.

So you could make a request with “X-Requested-With" header containing “XMLHttpRequest” (to trick the `xhr?` bit), and “DISCOURSE\_VISIBLE” as “true”.

Note that this wouldn’t be a “supported” way to use the API, but I don’t foresee any problems.

---

_[View the full topic](https://meta.discourse.org/t/request-from-api-doesnt-update-user-last-seen-at/108528)._
