# Verifieer of de ingevoerde gebruikersnaam van hen is of haal de gebruikersnaam of hun statistieken op na het inloggen

**URL:** <https://meta.discourse.org/t/verify-that-entered-username-is-theirs-or-get-the-username-or-their-stats-after-getting-logged-in/230846>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [23 juni 2022 om 06:51 UTC](https://meta.discourse.org/t/verify-that-entered-username-is-theirs-or-get-the-username-or-their-stats-after-getting-logged-in/230846 "2022-06-23T06:51:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![creamit](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@creamit](https://meta.discourse.org/u/creamit)\
**Post date:** [23 juni 2022 om 06:59 UTC](https://meta.discourse.org/t/verify-that-entered-username-is-theirs-or-get-the-username-or-their-stats-after-getting-logged-in/230846/2 "2022-06-23T06:59:53Z")

</div>

I have tried to however compensate for verifying the user problem by checking the value of `user.can_edit` at `/u/{username}.json` endpoint which I hope will give true iff the user is itself logged in and the username is theirs. But when trying to send that request from the server I can’t certainly attach cookies which were automatically getting included by the browser when sending the request. So it would always be false.  
Also I have checked docs regarding `user-api-key` generation which will send requests as that user but there are too cors problems. (Isn’t there anything like if there is a valid `user-api-key` in headers then that request will send a response back?)

edit - Also one important thing, i am a non-admin, non-moderator user on that forum.

---

_[View the full topic](https://meta.discourse.org/t/verify-that-entered-username-is-theirs-or-get-the-username-or-their-stats-after-getting-logged-in/230846)._
