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

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?

You have two options.

  1. Use 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. In your case it would be the numeric part of the sub claim.
1 Like

Thank you!
This is exactly what I need.