# How to create a new Publisher programmatically?

**URL:** <https://community.wowza.com/t/how-to-create-a-new-publisher-programmatically/45252>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [May 8, 2015, 5:15pm UTC](https://community.wowza.com/t/how-to-create-a-new-publisher-programmatically/45252 "2015-05-08T17:15:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mete\_Soydas](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mete\_Soydas](https://community.wowza.com/u/Mete_Soydas)\
**Post date:** [May 8, 2015, 5:15pm UTC](https://community.wowza.com/t/how-to-create-a-new-publisher-programmatically/45252/1 "2015-05-08T17:15:40Z")

</div>

Hi,

is there a way to create a wowza publisher account with username and password programmatically? while i was cheking the serverside api manual, i found a method named addPublisher which takes a publisher object. but i dont know where to use it or how to fill publisher object. Can you help me about using it ?

---

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [May 12, 2015, 10:53am UTC](https://community.wowza.com/t/how-to-create-a-new-publisher-programmatically/45252/2 "2015-05-12T10:53:03Z")

</div>

The Publisher API isn’t associated with the publishing account as specified in the publish.password file. Here are couple of options:

> > Write a module that modifies the publish.password file to add/remove access to/from it.

> > You could look into doing something a bit more dynamic by taking advantage of [User Authentication via JDBC article](https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database). You could modify this to leverage a file as well in lieu of a database. Or perhaps you might find [this module](https://www.wowza.com/docs/how-to-integrate-wowza-user-authentication-with-external-authentication-systems-modulertmpauthenticate%28ModuleRTMPAuthenticate%29) as more direct drop-in replacement for the publish.password file.

> > Alternatively, take a look into our [REST Preview](https://www.wowza.com/docs/wowza-streaming-engine-rest-api) as you could initiate this via a request to the API. You could do a POST to

```auto
http://localhost:8087/v2/servers/_defaultServer_/publishers

```

endpoint and pass in the name and password accordingly (for creation).
