# Problem with token creation

**URL:** <https://community.wowza.com/t/problem-with-token-creation/51944>\
**Category:** Wowza Streaming Engine\
**Tags:** security\
**Created:** [September 14, 2018, 4:53pm UTC](https://community.wowza.com/t/problem-with-token-creation/51944 "2018-09-14T16:53:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobias\_Schneider](https://avatars.discourse-cdn.com/v4/letter/t/7bcc69/32.png) [@Tobias\_Schneider](https://community.wowza.com/u/Tobias_Schneider)\
**Post date:** [September 14, 2018, 4:53pm UTC](https://community.wowza.com/t/problem-with-token-creation/51944/1 "2018-09-14T16:53:44Z")

</div>

I tried to create a token, so that it matches the token of server.

But i cant get the right Token for:

rtmp://192.168.1.79:1935/live/test?wowzatokenendtime=1600000000&wowzatokenCustomParameter=abcdef&wowzatokenhash=WRONG\_TOKEN

I saw in the logs that the correct token will be

YQ-JU-z4mtKsx0OsxGB2dwvs1CDsDefkOcGdBO8hD4s=

My Method for tokengenerating:

public static string GenerateSHA256String(string inputString)  
{  
SHA256 sha256 = SHA256Managed.Create();  
byte[] bytes = Encoding.UTF8.GetBytes(inputString);  
byte[] hash = sha256.ComputeHash(bytes);  
string token = Convert.ToBase64String(hash);  
token = token.Replace(’+’, ‘-’);  
token = token.Replace(’/’, ‘\_’);  
return token;  
}

Shared Secret: abcdef

I hope i gave all needed information.

Best regards

Tobias

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [September 17, 2018, 4:04pm UTC](https://community.wowza.com/t/problem-with-token-creation/51944/2 "2018-09-17T16:04:16Z")

</div>

Thanks for your question, you can read here how to debug common token config issues. Scroll down to the “Troubleshooting” section.

**[https://www.wowza.com/docs/how-to-protect-streaming-using-securetoken-in-wowza-streaming-engine#troubleshooting](https://www.wowza.com/docs/how-to-protect-streaming-using-securetoken-in-wowza-streaming-engine#troubleshooting)**

If this does not solve your issue, please submit a support ticket @Tobias Schneider and we will assist you.

> **[Open a Support Ticket | Wowza Media Systems](https://www.wowza.com/support/open-ticket)**
>
> Wowza technical support engineers worldwide help you succeed with your Wowza Streaming Engine™ software or the Wowza Streaming Cloud™ service.
