# onStreamCreate -- getName()

**URL:** <https://community.wowza.com/t/onstreamcreate-getname/47294>\
**Category:** Wowza Streaming Engine\
**Created:** [August 4, 2016, 4:41pm UTC](https://community.wowza.com/t/onstreamcreate-getname/47294 "2016-08-04T16:41:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saul\_Reed](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Saul\_Reed](https://community.wowza.com/u/Saul_Reed)\
**Post date:** [August 4, 2016, 4:41pm UTC](https://community.wowza.com/t/onstreamcreate-getname/47294/1 "2016-08-04T16:41:13Z")

</div>

Hello:

I’d like to take a specific action on my server when a stream is created; as such, I’ve hooked into onStreamCreate(…), but when I try to getName(), it’s empty. I’ve seen another post, [IMediaStream stream.getName is empty. How come?](http://community.wowza.com/t/-/35423), but I’m a little confused as to the answer.

What can I hook into that will allow me to find the stream name?

Thanks.

---

<div class="post-metadata">

**Author:** ![SiggDev](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@SiggDev](https://community.wowza.com/u/SiggDev)\
**Post date:** [August 5, 2016, 1:02pm UTC](https://community.wowza.com/t/onstreamcreate-getname/47294/2 "2016-08-05T13:02:28Z")

</div>

You should probably use onPublish instead of onStreamCreate. You don’t have the stream name yet in onStreamCreate (too early in the workflow).

---

<div class="post-metadata">

**Author:** ![SiggDev](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@SiggDev](https://community.wowza.com/u/SiggDev)\
**Post date:** [August 9, 2016, 10:21am UTC](https://community.wowza.com/t/onstreamcreate-getname/47294/3 "2016-08-09T10:21:54Z")

</div>

You’re welcome, glad I could help. Good luck with your project!

---

<div class="post-metadata">

**Author:** ![Saul\_Reed](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Saul\_Reed](https://community.wowza.com/u/Saul_Reed)\
**Post date:** [August 5, 2016, 2:32pm UTC](https://community.wowza.com/t/onstreamcreate-getname/47294/4 "2016-08-05T14:32:21Z")

</div>

Thank you, SiggDev! It works, and your answer is most appreciated!
