Not receiving any media streams when running sample app

I’m running the sample app here: https://github.com/zoom/rtms-developer-preview-js

It appears to work successfully, but no media data is ever received. It gets meeting.rtms_stopped after about 30 seconds of running. These are the full logs:

webhook  | 2025-05-04T20:05:54.751Z | INFO  | Creating standard HTTP webhook server
webhook  | 2025-05-04T20:05:54.753Z | INFO  | Listening for webhook events at http://localhost:8080/
webhook  | 2025-05-04T20:06:13.341Z | DEBUG | Received webhook request: /
webhook  | 2025-05-04T20:06:13.341Z | INFO  | Received event: meeting.rtms_started
Received webhook event: meeting.rtms_started
client   | 2025-05-04T20:06:13.347Z | DEBUG | Setting audio parameters: {"contentType":2,"codec":4,"sampleRate":16000,"channel":1,"dataOpt":1,"duration":20,"frameSize":320}
client   | 2025-05-04T20:06:13.347Z | DEBUG | audio parameters set successfully
rtms     | 2025-05-04T20:06:13.347Z | DEBUG | Found system CA certificate: /etc/ssl/certs/ca-certificates.crt
rtms     | 2025-05-04T20:06:13.348Z | INFO  | Initializing RTMS SDK with CA certificate: /etc/ssl/certs/ca-certificates.crt
rtms     | 2025-05-04T20:06:13.370Z | INFO  | RTMS SDK initialized successfully
client   | 2025-05-04T20:06:13.370Z | INFO  | Joining meeting: 4amwIio2TueyJNOKwJpSdw==
rtms     | 2025-05-04T20:06:13.370Z | DEBUG | Generating signature for client: lX3jW3eTP3_WEAh9ByPw, uuid: 4amwIio2TueyJNOKwJpSdw==, streamId: 764a3062ea7b4d459e75e70db4cd5e8a
client   | 2025-05-04T20:06:13.373Z | INFO  | Successfully joined meeting: 4amwIio2TueyJNOKwJpSdw==
client   | 2025-05-04T20:06:13.373Z | DEBUG | Starting polling with interval: 0ms
Join result: true
webhook  | 2025-05-04T20:06:21.375Z | DEBUG | Received webhook request: /
webhook  | 2025-05-04T20:06:21.375Z | INFO  | Received event: meeting.rtms_stopped
Received webhook event: meeting.rtms_stopped

This is the RTMS code I was running, I would have expected it to receive audio data

// Import the RTMS SDK
import rtms from "@zoom/rtms";

// Set up webhook event handler to receive RTMS events from Zoom
rtms.onWebhookEvent(({ event, payload }) => {
  console.log(`Received webhook event: ${event}`);

  // Only process webhook events for RTMS start notifications
  if (event !== "meeting.rtms_started") {
    console.log(`Received event ${event}, ignorsding...`);
    return;
  }
  
  // Create a client instance for this specific meeting
  const client = new rtms.Client();
  

  // Configure HD video (720p H.264 at 30fps)
  client.setAudioParameters({
    contentType: rtms.AudioContentType.RAW_AUDIO,
    codec: rtms.AudioCodec.OPUS,
    sampleRate: 16000,
    channel: rtms.AudioChannel.MONO,
    dataOpt: rtms.AudioDataOption.AUDIO_MIXED_STREAM,
    duration: 20,
    frameSize: 320
  });
  
  // Set up audio data handler
  client.onAudioData((data, size, timestamp, metadata) => {
    console.log(`Audio data: ${size} bytes from ${metadata.userName}`);
  }); 


  // Set up transcript data handler
  client.onTranscriptData((data, size, timestamp, metadata) => {
    console.log(`${metadata.userName}: ${data}`);
  });

  // Join the meeting using the webhook payload directly
  let joinResult = client.join(payload);
  console.log(`Join result: ${joinResult}`);
});

Does the home URL for my zoom app need to link to a functional zoom app? Currently it just points to a localhost url that doesn’t do anything, so the zoom app displays a blank screen. Auto-start is enabled for the zoom app though and the webhook url is pointing to ngrok. So unclear if you need a functional home url AND a webhook url or if you just need a webhook url.

Update: Here’s some feedback that something is going wrong. In the zoom client you see this for a about 30 seconds

then it says connection failed and we get the rtms.stopped event

Update:

This has been resolved. The issue was that I was using my development client id / secret instead of the production one.

It would be nice if there was an error message about invalid client id / secret emitted by the SDK or sample app. Seems like a fairly common issue that people will encounter.

1 Like

Sorry that you ran into this issue! I agree that this can be frustrating. As a matter of security, the core SDK that I built this around does not provide a method to determine if/why the token is incorrect.

I’m working with our engineering team to potentially improve this going forward.