# How to toggle source security with the rest API?

**URL:** <https://community.wowza.com/t/how-to-toggle-source-security-with-the-rest-api/95833>\
**Category:** Wowza Streaming Engine\
**Tags:** rest-api\
**Created:** [January 18, 2023, 11:55pm UTC](https://community.wowza.com/t/how-to-toggle-source-security-with-the-rest-api/95833 "2023-01-18T23:55:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Hailwood](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matthew_hailwood/32/815_2.png) [@Matthew\_Hailwood](https://community.wowza.com/u/Matthew_Hailwood)\
**Post date:** [January 18, 2023, 11:55pm UTC](https://community.wowza.com/t/how-to-toggle-source-security-with-the-rest-api/95833/1 "2023-01-18T23:55:42Z")

</div>

So I know how to create publishers using the API, and if in the manager Applications/{name}/Source Security/RTSP Sources is set to “Require password authentication” everything works great.

It also works great if we don’t have a publisher and then have that option set to “Open”.  
I’d like to offer our clients the ability to select whether they want to enable or disable authentication.

So while I can create/delete the publishers, I can’t work out how to toggle the authnetication requirements using the rest API.

Can I please have some examples of the requests I’d need to set

- RTMP to Open
- RTMP to Require password authentication
- RTSP to Open
- RTSP to Required password authentication

 ![image](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/2X/0/0dc7095d3662476604caa71a70829a06380a6ef5.png)

---

<div class="post-metadata">

**Author:** ![Tim\_Dougherty](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/tim_dougherty/32/596_2.png) [@Tim\_Dougherty](https://community.wowza.com/u/Tim_Dougherty)\
**Post date:** [January 21, 2023, 12:29am UTC](https://community.wowza.com/t/how-to-toggle-source-security-with-the-rest-api/95833/2 "2023-01-21T00:29:23Z")

</div>

I was able to figure out how to toggle RTMP using the REST API. This is a screenshot from the Swagger doc. Haven’t found the RTSP equivalent (yet). It has to be in there because WSEM uses the REST API to perform the operation.

 ![Screenshot 2023-01-20 at 4.27.12 PM](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/2X/d/dcf0e4787d5ee33e2f35717ca11ff9e3535373cc.png)

---

<div class="post-metadata">

**Author:** ![Matthew\_Hailwood](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matthew_hailwood/32/815_2.png) [@Matthew\_Hailwood](https://community.wowza.com/u/Matthew_Hailwood)\
**Post date:** [January 23, 2023, 10:13pm UTC](https://community.wowza.com/t/how-to-toggle-source-security-with-the-rest-api/95833/3 "2023-01-23T22:13:55Z")

</div>

It appears that did… something, but not what we are after.  
After running that it wiped out the modules from my config, and even so the toggle was not changed in the UI.

I did find that sending across a request to update the advanced config and toggling the `securityPublishRequirePassword` option there has worked for RTMP.

Similarly though, I have not been able to find how to toggle this for RTSP.
