Zoom web sdk "rename" api usage

Description
I am using sample-webapp shared by zoom for zoom sdk.
I tried using rename API of zoom but it throws error and error code is 3003.
But if I try to rename it on zoom SDK initialised UI interface it allows me.
Which version?
Knowing the version can help us to identify your issue faster.

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Download the sample-webapp for zoom sdk “https://github.com/zoom/sample-app-web
  2. run the app and try to rename participant from code it will throw exception.
  3. Try to rename participant on zoom UI it will be successful.
  4. ideally it should not allow from zoom UI also.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Desktop
  • OS: MacOS
  • Version 10.14.3

Additional context
Add any other context about the problem here.

2 Likes

Hi @suchita,

Just for clarification, you’re looking to change the participant name found here correct?

35%20PM

Thanks

Hi @michael_p.zoom,

No I am looking for change of name under participants name where on hover we have rename option

Thanks

3003 is ERROR_NOT_HOST
only host can use this api and change name,

Hello @JackYang,

Yes I am getting that error, but i am using sample-webapp of zoom-sdk where user joins the meeting with role 0 then how am I able to rename the participants name on the UI instantiated using sample-webapp.

Hi @suchita,

If you’re the guest attendee using the WebSDK, then you’re allowed to change your name within the UI.

Thanks

Thanks @michael_p.zoom

1 Like

I checked just now in version 1.8.0. Seems like you actually can rename yourself via the ZoomMtg.rename() function. But it still throws the error code 3003, meaning ERROR_NOT_HOST.

So, it does actually rename the user (using the user’s own userId via ZoomMtg.getCurrentUser()), but since it throws (falsely?) the logic flow needs to have this in consideration.

Being able to rename yourself via the Web SDK is something desirable, so please keep allowing this.
But don’t throw error 3003 when renaming yourself, only when trying to rename a different user.

Hey @daniel2,

Do you have the “Allow participants to rename themselves” setting turned on?

Thanks,
Tommy

Yes, the meeting settings allow users to rename themselves.

But now in version 1.9.1 of the Web SDK, the ZoomMtg.rename() function only works like one time, and then it stops working.

It still throws the same error as before, that the user is not Host nor Co-Host.

I first get an error callback, but if it works I also get a success callback. So yes, I receive both an error and success callback at the same time…

I can’t figure out how this could be! The SDK has a working under-the-hood API to rename the user via the participants list UI. Why does the SDK not use the same internal API as the UI?

1 Like

Hey @daniel2,

Thank you for reaching out to the Zoom Developer Forum. Just to confirm, are you seeing this issue when testing with the Sample Web App? If so, please submit a new forum post with steps to reproduce the issue and we’ll investigate the issue further.

Thanks,
Max

I confirmed just now that yes, this bug appears in the Sample Web App. That is, the bug in which I retrieve both an error and a success callback, but the renaming actually works.

Just setup the Sample Web App according to the instructions, and run this code in the browser’s console:

ZoomMtg.getCurrentUser({
  success (res) {
    console.log('Retrieved the current user.', res)
    ZoomMtg.rename({
      userId: res.result.currentUser.userId,
      oldName: res.result.currentUser.userName,
      newName: 'The New User Name',
      success (res) {
        console.log('Renamed the user.', res)
      },
      error (err) {
        console.error('Failed to rename the user!', err)
      }
    })
  },
  error (err) {
    console.error('Failed to get current user!', err)
  }
})

Should I create a new post about it? Here’s a video of it in action as well:

Hey @daniel2,

Thank you for providing that information as well as steps to reproduce the issue! That was very helpful. I’ve since reproduced your issue an saw that it is only present when using the Safari browser.

I’ve since reached out to our engineering team to see if they are able to provide a fix. I’ll update you here when I have more information. (CS-3216)

Thanks,
Max

1 Like