Provider Account With a Room

Usecase: I already have a way to sign up, manage my provider on my own providers' portal and now I want them to go to VSee Clinic for additional telehealth functionality. My portal has multiple providers, each provider should have their own Waiting Room in VSee Clinic to accept their own pool of patients.
Step 1: Obtain provider access token from POST /users/sso API call
The API will return you the token (data.token.token) look like this 66bcd0acff324e8a44992d9596b5d361.
curl --location 'https://api.vseepreview.com/vc/stable/api_v3/users/sso?fields=vsee' \
--header 'X-AccountCode: sandbox' \
--header 'X-ApiKey: 8acd6ac0a7193ad17f56ce694e94df2f' \
--header 'X-ApiSecret: 8ece42756425bb1ec31aee0f29d02a87' \
--header 'Content-Type: application/json' \
--data-raw '{
    "first_name": "VSee Edward",
    "last_name": "Provider Sandbox",
    "type": 400,
    "email": "edward+002.provider.sandbox@vseelab.com",
    "code": "edward+002.provider.sandbox@vseelab.com"
}'
Step 2: Create a waiting room in the clinic via POST /rooms API call
The API will return you the room ID and room code (data.id, data.code). If the room already exists, it will return error 400.
curl --location 'https://api.vseepreview.com/vc/stable/api_v3/rooms' \
--header 'X-AccountCode: sandbox' \
--header 'X-ApiKey: 8acd6ac0a7193ad17f56ce694e94df2f' \
--header 'X-ApiSecret: 8ece42756425bb1ec31aee0f29d02a87' \
--header 'X-ApiToken: f9960859c1c1ff77bac8e54a7b0af395' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": "sandbox.vseepreview.com",
    "slug": "sandbox-1725757636",
    "name": "sandbox-1725757636"
}'
Step 3: Assign the newly created provider to the waiting room via POST /users/:id/rooms API call
curl --location 'https://api.vseepreview.com/vc/stable/api_v3/users/{{user_id}}/rooms' \
--header 'X-AccountCode: sandbox' \
--header 'X-ApiToken: {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": "{{room_code}}"
}'
Step 4: Redirect the provider to their dashboard
The provider will be assigned to a room already and be able to see patients from that room.
You need to provide the user with a button or link to redirect to VSee Clinic. URL will follow this pattern:
{your_clinic_domain_url}auth?sso_token={token}&next={next_url}
e.g https://sandbox.vseepreview.com/vc/stable/auth?sso_token=66bcd0acff324e8a44992d9596b5d361&next=/providers/dashboard
This will log user in, then redirect user to https://sandbox.vseepreview.com/vc/stable/providers/dashboard
Your Clinic Domain URL: https://sandbox.vseepreview.com/vc/stable
SSO Token:
Next URL: /providers/dashboard