I am getting this error `Error: moveParticipant re...
# ask-ai
f
I am getting this error
Error: moveParticipant requires LiveKit Cloud. Please ensure you are using LiveKit Cloud or update your SDK version.
however, I am using latest SDK version and livekit cloud. How do I fix this ?
t
Thanks for reaching out, Dmitry. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding about the
moveParticipant
error you shared. Please check these three things — one of them is the usual cause: 1. Confirm your URL is LiveKit Cloud ◦ Your server URL must end with
.livekit.cloud
(for example
https://your-project.livekit.cloud
). If you’re accidentally pointing to a self‑hosted server the
moveParticipant
API isn’t available. 1. Call
moveParticipant
from the RoomService client ◦ Use the RoomService API, e.g.:
Copy code
await roomService.moveParticipant(roomName, identity, destinationRoom);
• Ensure
roomService
was initialized with your LiveKit Cloud URL and API credentials. 1. Verify the API key grants ◦ The API key/secret used must belong to your LiveKit Cloud project and include the
roomAdmin
grant required for
MoveParticipant
. If you’ve verified all three and still see the error, tell me: • the exact LiveKit URL you’re calling ( redact secrets ), and • how you initialize
roomService
(a short snippet is fine ). I’ll follow up with the next diagnostic steps. Sources: Managing participants | LiveKit docs
f
1. I am using
wss://my-first-app-tdxst0e1.livekit.cloud
2. this is my code
Copy code
await this.roomServiceClient.moveParticipant(
          tempTransferRoom,
          transferHumanIdentity,
          mainRoom
        );
t
Thanks — helpful details. A few quick checks so I can pinpoint the problem: 1. How do you initialize
roomServiceClient
? Please share the short snippet (redact secrets). I need to confirm it’s created against
https://my-first-app-tdxst0e1.livekit.cloud
(not the WSS URL) and using Cloud credentials. 2. Which API key are you using for that client, and does it include the
roomAdmin
grant? If you’re not sure, tell me the grant flags you set when creating the token. 3. Confirm your server-side SDK version (the package that provides
RoomServiceClient
) — you mentioned latest, but please paste the exact version from your package.json or
npm list
. Once you share those three items I’ll tell you the precise fix.
f
livekit-server-sdk: 2.14.2
t
Thanks — this is helpful. Please share the short snippet showing how you initialize
roomServiceClient
(redact secrets). I need to confirm two things from that snippet: • you’re constructing the client with the HTTPS Cloud URL (
https://my-first-app-tdxst0e1.livekit.cloud
) — not the WSS signaling URL, and • you’re passing a LiveKit Cloud API key/secret that includes the
roomAdmin
grant. If you can’t share code, tell me: • the exact host string used to create
roomServiceClient
, and • the grant flags you set when creating the API key/token.
f
Copy code
this.roomServiceClient = new RoomServiceClient(
      this.config.livekitUrl,
      this.config.apiKey,
      this.config.apiSecret
    );
t
Thanks — this is close. Two quick checks to finish diagnosing: 1. Confirm the exact value of
this.config.livekitUrl
— it must be the HTTPS Cloud host (
https://my-first-app-tdxst0e1.livekit.cloud
) not the WSS URL you showed earlier. 2. Confirm the API key/token grants — does the key/secret you pass include the
roomAdmin
grant? If you created a short-lived token instead, tell me the grant flags used when creating it. If both are correct, paste the small snippet you use to create the token (or tell me the grant flags). I’ll tell you the next step.
f
I changed from wss to https in staging and it worked, but now I am getting the same error in production Failed to merge calls: Error: moveParticipant requires LiveKit Cloud. Please ensure you are using LiveKit Cloud or update your SDK version.
t
Thanks — I’ll help diagnose the production recurrence. Please confirm these three things for your production environment: 1. Exact LiveKit URL used by
roomServiceClient
in production (paste the value of `this.config.livekitUrl`; redact secrets). It must be the HTTPS Cloud host:
https://<project>.livekit.cloud
. 2. The API key/secret or token grants used in production — specifically whether the key includes the
roomAdmin
grant (or the grant flags used when creating the token). 3. Server SDK version running in production (you gave
livekit-server-sdk: 2.14.2
for staging — confirm production uses the same). Additionally, a couple quick checks you can run now: • Search your production build/config for any remaining
wss://
or non-HTTPS livekit host values (signaling URLs can leak into configs). • If you generate short‑lived tokens server-side, confirm the token generation code in production sets
roomAdmin
in the grants. Share the three items above (and the token generation snippet if convenient) and I’ll point to the exact fix.
f
1. confirmed https:// 2. i can't find grants in livekit UI 3. it's runnin on same version
t
Thanks — you’ve confirmed HTTPS and SDK version, so the remaining likely cause is the credentials used in production do not include the required roomAdmin grant. What to check and how to fix 1) LiveKit Cloud API key vs token • The RoomService APIs require credentials with the roomAdmin grant. If you pass a project API key + secret directly to RoomServiceClient, that key must have roomAdmin. • The LiveKit UI may not show grants on existing keys. Check how the production credentials were created. 2) If you create short‑lived tokens server‑side • Ensure when you build the token you include roomAdmin in the grants. Example grant flags you should set when creating the token: include
roomAdmin: true
(or the equivalent field your SDK uses). 3) Quick actionable steps • On your production server, print or log the exact host string and which credential type is passed into RoomServiceClient (API key/secret or a generated token). Confirm the host is
https://<project>.livekit.cloud
. • If using an API key/secret created earlier, recreate a Cloud API key that includes the
roomAdmin
grant and use that key/secret in production. • If using generated tokens, update the token generation to set
roomAdmin
in the grants and replace tokens used by RoomServiceClient. If you want, paste the snippet you use to generate the token (redact secrets) or tell me whether you pass an API key+secret or a token into RoomServiceClient — I’ll point to the exact code change to add
roomAdmin
.