Embedding the VSee Waiting Room

Patient Side Integration

Prerequisites: you already have a patient portal where patients sign up and log in. You want them to go on to VSee Clinic without signing up or logging in again.

The examples use the staging clinic https://vclinic.vseepreview.com/vc/next/. Replace it with your own clinic's URL.


Use case 1: Log the patient in and open the VSee Clinic patient dashboard

Try it yourself in the Patient Dashboard use case.

Step 1: Get a patient access token

Call POST /users/sso. The API returns the token in data.token.token. The examples below show it as <SSO_TOKEN>.

Step 2: Redirect the patient to your VSee Clinic page

Give the patient a button or link that goes to VSee Clinic. The URL follows this pattern:

{portal_base_url}auth?sso_token={token}&next={next_url}

For example:

https://vclinic.vseepreview.com/vc/next/auth?sso_token=<SSO_TOKEN>&next=/u/clinic

This logs the patient in, then redirects them to https://vclinic.vseepreview.com/vc/next/u/clinic.

Additional options:

  • disable_navigation=1: disable all email communication.

For example:

https://vclinic.vseepreview.com/vc/next/auth?sso_token=<SSO_TOKEN>&next=/u/clinic&disable_navigation=1

Use case 2: Log the patient in and start a video session

Try it yourself in the Video Session use case.

Step 1: Get a patient access token

Call POST /users/sso. The API returns the token in data.token.token (written <SSO_TOKEN> in these examples). The user's ID (data.id) is used as member_id in step 3.

Step 2: Create an intake

Call POST /intakes with the SSO token from step 1 in the X-ApiToken header. The response contains the intake ID in data.id, for example 61165a8e-d8cc-47da-bd8e-597d64457b1f.

Step 3: Create a walk-in visit

Call POST /visits/add_walkin with the SSO token from step 1 in the X-ApiToken header and the intake_id from step 2. The response contains the visit ID in data.id, for example 67258.

Step 4: Redirect the patient to the video call and chat page

https://vclinic.vseepreview.com/vc/next/auth?sso_token=<SSO_TOKEN>&next=/visits/start/67258

Use case 3: Log the patient in and schedule an appointment

Try it yourself in the Appointment Scheduling use case.

Step 1: Get a patient access token

Call POST /users/sso. The API returns the token in data.token.token (written <SSO_TOKEN> in these examples). The user's ID (data.id) is used as member_id in step 3.

Step 2: Create an intake

Call POST /intakes with the SSO token from step 1 in the X-ApiToken header. The response contains the intake ID in data.id, for example 61165a8e-d8cc-47da-bd8e-597d64457b1f.

Step 3: Create a scheduled appointment

Call POST /visits with the SSO token from step 1 in the X-ApiToken header and the intake_id from step 2. The response contains the visit ID in data.id, for example 67258.

If your clinic uses one-time appointment links, the visit also contains data.one_time_link_token (shown below as <APPOINTMENT_TOKEN>). Build a link in this format and send it to the patient:

https://vclinic.vseepreview.com/vc/next/members/appointment/67258?token=<APPOINTMENT_TOKEN>

Step 3b (optional): Let the patient finish scheduling in VSee Clinic

You can let the patient see the intake you created in step 2, confirm it, and go on to the scheduling calendar in VSee Clinic. Send the patient to the landing page with the intake_id parameter:

https://vclinic.vseepreview.com/vc/stable/u/clinic?intake_id=61165a8e-d8cc-47da-bd8e-597d64457b1f&action=appointment#schedule-appointment

Note: To schedule a visit, the providers' availability (slots) must be set up first. The only exception is when you use the Admin API Token: it overrides the schedule and creates the appointment even when the calendar is empty.


Use case 4: Log the patient in and create an eConsult (asynchronous visit)

Try it yourself in the eConsult (Async Visit) use case.

Step 1: Get a patient access token

Call POST /users/sso. The API returns the token in data.token.token (written <SSO_TOKEN> in these examples). The user's ID (data.id) is used as member_id in step 3.

Step 2: Create an intake

Call POST /intakes with the SSO token from step 1 in the X-ApiToken header. The response contains the intake ID in data.id, for example 61165a8e-d8cc-47da-bd8e-597d64457b1f.

Step 3: Create an asynchronous visit (eConsult)

Call POST /visits/add_econsult with the SSO token from step 1 in the X-ApiToken header and the intake_id from step 2. The response contains the visit ID in data.id, for example 67258.

Because this is an asynchronous visit, every provider assigned to the waiting room sees it, and one of them must accept it.


Try it yourself in the Guest Invite use case.

Follow steps 1 to 3 of use case 2 or use case 3 to get a visit.

Step 4: Get the visit

Call GET /visits/:id:

{
  "id": "8888",
  "code": "<VISIT_CODE>",
  ...
}

Take the code value and build the invite link:

https://vclinic.vseepreview.com/vc/next/visits/join/<VISIT_CODE>