missing producerId on consumer

I need some pointers with the producerId when creating a consume.
https://mediasoup.org/documentation/v3/mediasoup/api/#transport-consume

take for example the code to create a video track producer

echo ">>> creating mediasoup video Producer..."

res=$(${HTTPIE_COMMAND}  \
	POST ${SERVER_URL}/rooms/${ROOM_ID}/broadcasters/${BROADCASTER_ID}/transports/${videoTransportId}/producers \
	kind="video" \
	rtpParameters:="{ \"codecs\": [{ \"mimeType\":\"video/vp8\", \"payloadType\":${VIDEO_PT}, \"clockRate\":90000 }], \"encodings\": [{ \"ssrc\":${VIDEO_SSRC} }] }" \
    )

eval "$(echo ${res} | jq -r '@sh "producerId=\(.id)"')"

echo "Video producerId:"${producerId}
Video producerId:2e84c688-7d7d-44f4-90e0-0e92079881b5

is it correct to now use that reference when creating the video consumer

    ${HTTPIE_COMMAND} -v \
    POST ${SERVER_URL}/rooms/${ROOM_ID}/broadcasters/${BROADCASTER_ID}/transports/${videoTransportId}/consume \
    producerId="2e84c688-7d7d-44f4-90e0-0e92079881b5" 

my assumptions on the above POST command variables are referencing the consumer.

${BROADCASTER_ID}
${videoTransportId}

So now I get a returned error

POST /rooms/testme3/broadcasters/eyfzU6h464Breuw8kBHyJ7OOWZMoaaa/transports/e91b2307-2197-4462-a69f-c958acb24bd2/consume HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 54
Content-Type: application/json
Host: gst.nxgn.link:4443
User-Agent: HTTPie/0.9.8

{
    "producerId": "2e84c688-7d7d-44f4-90e0-0e92079881b5"
}

HTTP/1.1 400 missing producerId
Connection: keep-alive
Content-Length: 29
Content-Type: text/html; charset=utf-8
Date: Wed, 03 Feb 2021 11:07:25 GMT
ETag: W/"1d-uGdbc12KurUIaTDKO43P260k/ns"
X-Powered-By: Express

TypeError: missing producerId

I did not find a reference to this constructed error in the Rooms.js file

Can someone point me to where / how this error is being reported and if I am using the incorrect parameter in the POST call.

Please do not focus on the mediasoup demo. It’s not supposed to be a production grade application at all.

I don’t reply to questions about the mediasoup-mode usage, so this is an exception:

expressApp.post(
		'/rooms/:roomId/broadcasters/:broadcasterId/transports/:transportId/consume',
		async (req, res, next) =>
		{
			const { broadcasterId, transportId } = req.params;
			const { producerId } = req.query;

The producerId must be given in the URL query params rather than in the POST body. Why? because the demo is done that way.

thanks @ibc, I am actually building my own interface, but try to go back to the demo as a common example code if I cannot get my interface to work.

I missed in the httpie spec that a query param should be ==
so for others hitting the issue, I adjusted the app string in the demo app to

    ${HTTPIE_COMMAND} -v \
    POST ${SERVER_URL}/rooms/${ROOM_ID}/broadcasters/${BROADCASTER_ID}/transports/${videoTransportId}/consume \
    producerId=="7e5796f7-4e97-482f-bfd7-3466e5693f64"