This message was deleted.
# helpdesk
s
This message was deleted.
a
what code are you running that produces that error?
m
Copy code
const liveKitPermission = {
    canPublish: permissions.canPublish || permissions.isSpeaker || permissions.isPresenter,
    canSubscribe: true,
    canPublishData: true,
    canPublishSources: getPublishSources(permissions, room.roomType),
    roomAdmin: permissions.isCohost,
    room: roomId
  }

  const metadata = {
    userId: userToUpdate,
    roomId,
    isHost: roomUserToUpdate.isHost,
    name: userDetails.name,
    username: userDetails.username,
    picture: userDetails.profile_photo,
    canPublish: permissions.canPublish || permissions.isSpeaker || permissions.isPresenter || permissions.isVideoOn,
    isSpeaker: permissions.isSpeaker,
    isPresenter: permissions.isPresenter,
    isCohost: permissions.isCohost,
    isVideoOn: permissions.isVideoOn
  }
await Promise.all(roomUserToUpdate.deviceId.map(async (device) => {
    await svc.updateParticipant(roomId, device, JSON.stringify(metadata), liveKitPermission)
  }))
Basically
updateParticipant()
method is giving me this error
d
which version of the SDK?
m
@dry-elephant-14928 I am currently using
livekit-server-sdk: ^1.1.4
d
I think the issue might be your metadata contains unsupported elements. can you console.log it to see what it contains? otherwise, take a look at the server logs to see what it says
I see you are using Cloud. what did you specify as the URL of the request? it should be just https://<subdomain>.livekit.cloud, without the path
m
Correct I have just specified the URL, Its: https://whalesbook.livekit.cloud