# Get viewer username inside extension

**URL:** <https://staging-discuss.dev.twitch.com/t/get-viewer-username-inside-extension/31717>\
**Category:** Extensions\
**Created:** [May 19, 2021, 12:51pm UTC](https://staging-discuss.dev.twitch.com/t/get-viewer-username-inside-extension/31717 "2021-05-19T12:51:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kozjar](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/kozjar/32/9714_2.png) [@Kozjar](https://staging-discuss.dev.twitch.com/u/Kozjar)\
**Post date:** [May 19, 2021, 12:51pm UTC](https://staging-discuss.dev.twitch.com/t/get-viewer-username-inside-extension/31717/1 "2021-05-19T12:51:30Z")

</div>

How I can get username after viewer share their id?  
I know about [https://dev.twitch.tv/docs/api/reference#get-users](https://dev.twitch.tv/docs/api/reference#get-users) endpoint, but it falls with “OAuth token is missing” message and I don’t see how I can get any valid token without extra OAuth authorization. And I also don’t want to use deprecated v5 api.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [May 19, 2021, 12:53pm UTC](https://staging-discuss.dev.twitch.com/t/get-viewer-username-inside-extension/31717/2 "2021-05-19T12:53:55Z")

</div>

This example describes a suitable work flow:

> **[GitHub - BarryCarlyon/twitch\_profile\_extension: A simple Twitch Extension to...](https://github.com/BarryCarlyon/twitch_profile_extension)**
>
> A simple Twitch Extension to cover the basics of using the JWT and EBS together to get Twitch API information - GitHub - BarryCarlyon/twitch\_profile\_extension: A simple Twitch Extension to cover th...

You have to send it via an EBS
