# Returning the producer.id to the client, mandatory ?

**URL:** <https://mediasoup.discourse.group/t/returning-the-producer-id-to-the-client-mandatory/2824>\
**Category:** mediasoup libraries\
**Created:** [May 24, 2021, 3:34pm UTC](https://mediasoup.discourse.group/t/returning-the-producer-id-to-the-client-mandatory/2824 "2021-05-24T15:34:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![OG-RTC](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@OG-RTC](https://mediasoup.discourse.group/u/OG-RTC)\
**Post date:** [May 24, 2021, 3:34pm UTC](https://mediasoup.discourse.group/t/returning-the-producer-id-to-the-client-mandatory/2824/1 "2021-05-24T15:34:07Z")

</div>

```auto

Reading the below code, i would like to know if this step is mandatory.

The reason i am asking is because i got it working without returning the producer.id to the client and calling the callback on the .produce client side

So my question is is this only needed if i want to track the producer.id server side from the client side and get stats etc?

Thanks

// Let's assume the server included the created producer id in the response
    // data object.
    const { id } = data;

    // Tell the transport that parameters were transmitted and provide it with the
    // server side producer's id.
    callback({ id });
  }

```

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 24, 2021, 4:02pm UTC](https://mediasoup.discourse.group/t/returning-the-producer-id-to-the-client-mandatory/2824/2 "2021-05-24T16:02:39Z")

</div>

Yes it’s. If it’s documented as mandatory (and it is) then it’s mandatory.
