# How to Configure Per-Channel Static Token-Based RTMP Authentication on Wowza

**URL:** https://community.wowza.com/t/how-to-configure-per-channel-static-token-based-rtmp-authentication-on-wowza/102480
**Category:** Wowza Streaming Engine
**Created:** [December 16, 2024, 11:43am UTC](https://community.wowza.com/t/how-to-configure-per-channel-static-token-based-rtmp-authentication-on-wowza/102480 "2024-12-16T11:43:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Florentin\_Valentan](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Florentin\_Valentan](https://community.wowza.com/u/Florentin_Valentan)
#### Post date: [December 16, 2024, 11:43am UTC](https://community.wowza.com/t/how-to-configure-per-channel-static-token-based-rtmp-authentication-on-wowza/102480/1 "2024-12-16T11:43:42Z")

</div>

Hello, Wowza Community,

I’m working on a multi-channel live-streaming platform where users can create their own channels. The platform requires the following setup:

1. **SecureToken Setup:**

- **On Edge Server:** SecureToken V2 is active and currently using time-based tokens (`?wowzatoken` with expiration and hash).
- **On Origin Server:** SecureToken V1 is configured to manage connections with the Edge server.

1. **New Requirement:**

- Each user should receive a unique RTMP URL with a **static token** that does not expire, e.g.:

```auto
rtmp://192.168.1.1/folder?token=N3U2DWNU9E23JNDJ9N923DJN2890J2890JN28092

```

- This token should allow the user to stream on their specific channel. Without the correct token, streaming should be denied.
- The same token will always be valid for that channel, even after server restarts or reconfigurations.

1. **Key Constraints:**

- The platform will host a **large number of channels and tokens** , so the configuration must be scalable.
- The Edge server should always connect to the same primary Origin server URL for processing.

**My Questions:**

1. **Token-Based Authorization for RTMP Publishing:**

- How can I configure Wowza to check for a **static token** in the RTMP URL for each channel and validate it before allowing publishing?
- Is there a module or custom development approach to make this happen?

1. **Efficient Management of Tokens:**

- Since the system will host many channels, is there a way to store and validate tokens dynamically (e.g., using a database or external API)?
- What would be the best practice to integrate such a system into Wowza for high performance?

1. **Edge-to-Origin Connection:**

- With SecureToken V2 already active on the Edge, should I adjust the current SecureToken settings between the Edge and Origin to ensure compatibility with the new token-based publishing requirement?

1. **Custom Modules:**

- Would a custom Wowza module be the best approach for implementing this per-channel static token validation? If so, are there any example modules or guidelines to use as a starting point?

**Configuration Details:**

- **Origin Server SecureToken:** SecureToken V1
- **Edge Server SecureToken:** SecureToken V2 with expiration
- **Example Workflow:**
  - User creates a channel → Platform generates a unique token for that channel → User streams using `rtmp://192.168.1.1/folder?token=...` → Wowza validates the token and starts the stream if valid.

Any help or guidance on how to achieve this setup would be greatly appreciated!

Thanks in advance

---

<div class="post-metadata">

### Author: ![Scott\_Kellicker2](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/scott_kellicker2/32/1337_2.png) [@Scott\_Kellicker2](https://community.wowza.com/u/Scott_Kellicker2)
#### Post date: [December 17, 2024, 6:01pm UTC](https://community.wowza.com/t/how-to-configure-per-channel-static-token-based-rtmp-authentication-on-wowza/102480/2 "2024-12-17T18:01:47Z")

</div>

A good example is the Wowza module called “wse-plugin-banstreams” on github. This shows how to block publish of an rtmp or rtsp stream. You could extend it to talk to some back end API or DB

Scott Kellicker  
Streaming Video Consultant

---

<div class="post-metadata">

### Author: ![Tom\_Ryan](https://avatars.discourse-cdn.com/v4/letter/t/8e8cbc/32.png) [@Tom\_Ryan](https://community.wowza.com/u/Tom_Ryan)
#### Post date: [December 18, 2024, 5:47pm UTC](https://community.wowza.com/t/how-to-configure-per-channel-static-token-based-rtmp-authentication-on-wowza/102480/3 "2024-12-18T17:47:21Z")

</div>

I think an easier way to do this, without any changes needed on the Wowza side, is to use the optional wowzatokenendtime (or start time) as a username for each unique user.

Make sure to set the end time well in the future (so it lasts basically forever to meet your request or in the past if start time) and then generate the hash (token) using that end/start time in your client app. You’ll need to do that anyway outside of Wowza. That application will determine whether the user has access to the channel and then using their “username” generate the hash (with the salt) and pass everything to the wowza stream. If you want additional security, include the ip address.

This should do exactly what you want.
