# How do I use ESI to get id of logged in user?

**URL:** <https://forums.eveonline.com/t/how-do-i-use-esi-to-get-id-of-logged-in-user/255912>\
**Category:** Third Party Developers\
**Created:** [July 20, 2020, 6:34pm UTC](https://forums.eveonline.com/t/how-do-i-use-esi-to-get-id-of-logged-in-user/255912 "2020-07-20T18:34:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ekat\_Naas](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/ekat_naas/32/491216_2.png) [@Ekat\_Naas](https://forums.eveonline.com/u/Ekat_Naas)\
**Post date:** [July 20, 2020, 6:34pm UTC](https://forums.eveonline.com/t/how-do-i-use-esi-to-get-id-of-logged-in-user/255912/1 "2020-07-20T18:34:45Z")

</div>

I want to show the user their location, and for that I need their character id.  
How do I get the character id of the user that is currently logged in?

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [July 20, 2020, 6:58pm UTC](https://forums.eveonline.com/t/how-do-i-use-esi-to-get-id-of-logged-in-user/255912/2 "2020-07-20T18:58:41Z")

</div>

You have two options.

1. Use [https://esi.evetech.net/ui/?version=meta#/Meta/get\_verify](https://esi.evetech.net/ui/?version=meta#/Meta/get_verify) with the user’s token, and get it from the response body.
2. Parse it out from the token. See [https://docs.esi.evetech.net/docs/sso/validating\_eve\_jwt.html](https://docs.esi.evetech.net/docs/sso/validating_eve_jwt.html). In your case it would be the numeric part of the `sub` claim.

---

<div class="post-metadata">

**Author:** ![Ekat\_Naas](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/ekat_naas/32/491216_2.png) [@Ekat\_Naas](https://forums.eveonline.com/u/Ekat_Naas)\
**Post date:** [July 20, 2020, 7:14pm UTC](https://forums.eveonline.com/t/how-do-i-use-esi-to-get-id-of-logged-in-user/255912/3 "2020-07-20T19:14:58Z")

</div>

Thank you!  
This is exactly what I need.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system](https://forums.eveonline.com/u/system)\
**Post date:** [October 18, 2020, 7:15pm UTC](https://forums.eveonline.com/t/how-do-i-use-esi-to-get-id-of-logged-in-user/255912/4 "2020-10-18T19:15:09Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
