# Getting Character ID when useing Implicit Grant

**URL:** <https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394>\
**Category:** Third Party Developers\
**Created:** [August 20, 2017, 10:34am UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394 "2017-08-20T10:34:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guitar\_Strings](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/guitar_strings/32/261947_2.png) [@Guitar\_Strings](https://forums.eveonline.com/u/Guitar_Strings)\
**Post date:** [August 20, 2017, 10:34am UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/1 "2017-08-20T10:34:43Z")

</div>

I’m using implicit grant flow in a novel web application I’m writing. Everything works fine but there is no way to get the Character ID for the account that is logged in.

For a server authentication flow, I would just access [https://login.eveonline.com/oauth/verify](https://login.eveonline.com/oauth/verify) . And get the Character ID from there. However this API does not set Access-Control-Allow-Origin headers so I can’t use AJAX.

So I’m kinda stumped as to how to get Character ID for the logged in user. when using Implicit grant.

---

<div class="post-metadata">

**Author:** ![Scipio\_Artelius](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/scipio_artelius/32/408264_2.png) [@Scipio\_Artelius](https://forums.eveonline.com/u/Scipio_Artelius)\
**Post date:** [August 20, 2017, 11:43am UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/2 "2017-08-20T11:43:18Z")

</div>

Does this not work once you receive a token?

[http://eveonline-third-party-documentation.readthedocs.io/en/latest/sso/obtaincharacterid.html](http://eveonline-third-party-documentation.readthedocs.io/en/latest/sso/obtaincharacterid.html)

---

<div class="post-metadata">

**Author:** ![Guitar\_Strings](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/guitar_strings/32/261947_2.png) [@Guitar\_Strings](https://forums.eveonline.com/u/Guitar_Strings)\
**Post date:** [August 20, 2017, 11:57am UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/3 "2017-08-20T11:57:42Z")

</div>

No I can access anything on ESI once I have a token. But I can’t access [https://login.eveonline.com/oauth/verify](https://login.eveonline.com/oauth/verify). Since it does not have Access-Control-Allow-Origin. I’m sure if I used curl or some non browser http request it would work. But since I’m using AJAX it does a OPTIONS round trip, and is dependent on Access-Control-Allow-Origin being sent.

---

<div class="post-metadata">

**Author:** ![Scipio\_Artelius](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/scipio_artelius/32/408264_2.png) [@Scipio\_Artelius](https://forums.eveonline.com/u/Scipio_Artelius)\
**Post date:** [August 20, 2017, 11:59am UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/4 "2017-08-20T11:59:39Z")

</div>

and you can’t use JSONP?

---

<div class="post-metadata">

**Author:** ![Guitar\_Strings](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/guitar_strings/32/261947_2.png) [@Guitar\_Strings](https://forums.eveonline.com/u/Guitar_Strings)\
**Post date:** [August 20, 2017, 12:09pm UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/5 "2017-08-20T12:09:06Z")

</div>

I’m not typically a front end developer so I’ll look into JSONP seems that might get around this particular  
issue. However it does seem kinda hackish to me from what I’ve seen so far.

Also some what short sighted to not be able to access the current Character ID when using a implicit flow?

---

<div class="post-metadata">

**Author:** ![Guitar\_Strings](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/guitar_strings/32/261947_2.png) [@Guitar\_Strings](https://forums.eveonline.com/u/Guitar_Strings)\
**Post date:** [August 20, 2017, 12:27pm UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/6 "2017-08-20T12:27:58Z")

</div>

I don’t think JSONP will work either. Since [https://login.eveonline.com/oauth/verify](https://login.eveonline.com/oauth/verify) requires the token to be set in an Authorization header.

---

<div class="post-metadata">

**Author:** ![Althalus\_Stenory](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/althalus_stenory/32/429792_2.png) [@Althalus\_Stenory](https://forums.eveonline.com/u/Althalus_Stenory)\
**Post date:** [August 20, 2017, 1:37pm UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/7 "2017-08-20T13:37:21Z")

</div>

[https://esi.tech.ccp.is/verify/](https://esi.tech.ccp.is/verify/) you can use this one iirc it work by passing token in url params

---

<div class="post-metadata">

**Author:** ![Guitar\_Strings](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/guitar_strings/32/261947_2.png) [@Guitar\_Strings](https://forums.eveonline.com/u/Guitar_Strings)\
**Post date:** [August 20, 2017, 1:41pm UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/8 "2017-08-20T13:41:09Z")

</div>

@Althalus_Stenory that’s perfect thank you. I just used Authorization header with Bearer token. Like my other requests.

---

<div class="post-metadata">

**Author:** ![Madbuster73](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/madbuster73/32/11837_2.png) [@Madbuster73](https://forums.eveonline.com/u/Madbuster73)\
**Post date:** [September 17, 2017, 9:18am UTC](https://forums.eveonline.com/t/getting-character-id-when-useing-implicit-grant/18394/9 "2017-09-17T09:18:20Z")

</div>

Thank Althalus!

That worked!

I wonder why this is nowhere mentioned, because there are a lot of JavaScript developers out there that cant get it to work.
