From 3d0b886ab8ab8c399843065414be927c77c687f3 Mon Sep 17 00:00:00 2001 From: stratself Date: Wed, 4 Mar 2026 08:48:41 +0000 Subject: [PATCH] fix(docs): apply clarity fixes for livekit testing from feedbacks * clearer wording and ordering on client token versus openid token * provide outputs for curl examples --- docs/calls/livekit.mdx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/calls/livekit.mdx b/docs/calls/livekit.mdx index edf507ed5..3e74b997e 100644 --- a/docs/calls/livekit.mdx +++ b/docs/calls/livekit.mdx @@ -242,15 +242,18 @@ rtc: ## Testing -To test that LiveKit is successfully integrated with Continuwuity, you will need to replicate its [Token Exchange Flow](https://github.com/element-hq/lk-jwt-service?tab=readme-ov-file#%EF%B8%8F-how-it-works--token-exchange-flow). First, request an OpenID token from your Matrix server: +To test that LiveKit is successfully integrated with Continuwuity, you will need to replicate its [Token Exchange Flow](https://github.com/element-hq/lk-jwt-service#%EF%B8%8F-how-it-works--token-exchange-flow). -```bash -curl -X POST -H "Authorization: Bearer " \ +First, you will need an access token for your current login session. These can be found in your client's settings or obtained via [this website](https://timedout.uk/mxtoken.html). + +Then, using that token, request another OpenID token for use with the lk-jwt-service: + +```console +~$ curl -X POST -H "Authorization: Bearer " \ https://matrix.example.com/_matrix/client/v3/user/@user:example.com/openid/request_token +{"access_token":"","token_type":"Bearer","matrix_server_name":"example.com","expires_in":3600} ``` -Your `` can be found in your client's settings, or via [this website](https://timedout.uk/mxtoken.html). The step above will respond with an `access_token` for use with the lk-jwt-service. - Next, create a `payload.json` file with the following content:
@@ -278,22 +281,23 @@ Replace `matrix_server_name` and `claimed_user_id` with your information, and `<
-You can then send this payload to the lk-jwt-service with: +You can then send this payload to the lk-jwt-service: -```bash -curl -X POST -d @payload.json https://livekit.example.com/get_token +```console +~$ curl -X POST -d @payload.json https://livekit.example.com/get_token +{"url":"wss://livekit.example.com","jwt":"a_really_really_long_string"} ``` -The JWT service will respond with a `jwt` token. Use this token to test at the [LiveKit Connection Tester](https://livekit.io/connection-test) - if everything works there, then you have set up LiveKit successfully! +The lk-jwt-service will, after checking against Continuwuity, answer you with a `jwt` token to create a LiveKit media room. Use this token to test at the [LiveKit Connection Tester](https://livekit.io/connection-test). If everything works there, then you have set up LiveKit successfully! ## Troubleshooting -To debug any issues, initiate a call and check the container logs for any specific errors. You can also enable Element Call's developer mode to check for further details such as your SFU's URL in there. +To debug any issues, initiate a call and check the container logs for any specific errors. You can also enable Element Call's developer mode to check for further details, such as your SFU's URL. ### Common errors in Element Call - `MISSING_MATRIX_RTC_FOCUS`: Livekit is missing from Continuwuity's config file -- "Waiting for media" popup: Livekit is configured in Continuwuity, but your client cannot connect to it for some reason +- "Waiting for media" popup always showing: Livekit is configured in Continuwuity, but your client cannot connect to it for some reason ### Docker networking issues