# Need help with esi corporation structure

**URL:** <https://forums.eveonline.com/t/need-help-with-esi-corporation-structure/379252>\
**Category:** Third Party Developers\
**Created:** [October 4, 2022, 10:47am UTC](https://forums.eveonline.com/t/need-help-with-esi-corporation-structure/379252 "2022-10-04T10:47:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Astra\_Agnon](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/astra_agnon/32/393450_2.png) [@Astra\_Agnon](https://forums.eveonline.com/u/Astra_Agnon)\
**Post date:** [October 4, 2022, 10:47am UTC](https://forums.eveonline.com/t/need-help-with-esi-corporation-structure/379252/1 "2022-10-04T10:47:40Z")

</div>

Hello.  
I have troble with esi:  
i send  
$header = "Authorization: Bearer " . $characterToken;  
$link = ‘[https://esi.evetech.net/latest/corporations/](https://esi.evetech.net/latest/corporations/)’ . corporation\_id . ‘/structures/?datasource=tranquility&language=en&page=1’;  
Use GET method.  
Server answer:

stdClass Object  
(  
[error] =\> authentication failure  
)  
What am I doing wrong?  
P.S. chatacter token have all access, and hi CEO corporation

---

<div class="post-metadata">

**Author:** ![Core\_Saissore](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/core_saissore/32/391448_2.png) [@Core\_Saissore](https://forums.eveonline.com/u/Core_Saissore)\
**Post date:** [December 11, 2022, 3:57pm UTC](https://forums.eveonline.com/t/need-help-with-esi-corporation-structure/379252/2 "2022-12-11T15:57:32Z")

</div>

You are doing something wrong with the JWT/authentication token. What does your `$characterToken` contain? Is it a string starting with `ey`?

BTW: In your `$link` line the `$` is missing for your `corporation_id`.

Regarding character token: Have you requested the token again after having granted additional access to the user? The authorization is persisted within the token and does not “refresh automatically”, so you can’t “add authorization” and “keep the old token”.

In case all that looks right, take the `$characterToken` and paste it at [https://jwt.io/](https://jwt.io/) under “Encoded”. It will decode the JWT for you. Paste the payload here to allow us check what might be wrong…

---

<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:** [March 11, 2023, 3:58pm UTC](https://forums.eveonline.com/t/need-help-with-esi-corporation-structure/379252/3 "2023-03-11T15:58:08Z")

</div>

Closed on March 11, 2023, 3:58pm UTC

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