Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
curl -X POST
    -H "X-AccountCode: vclinic"
    -H "X-ApiKey: vclinic_api_key"
    -H "Content-Type: multipart/form-data;"
    -F "first_name=John"
    -F "last_name=Provider"
    -F "code=cd978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb"
    -F "type=400"
    "https://api.vsee.me/api_v3/users/sso.json" -k

{
    "data": {
        "id": "10008",
        "code": "cd978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb",
        "first_name": "John",
        "last_name": "Provider",
        "username": "57d76ad979b843e6973e7855ac1f0144",
        "vseeid": "conciergedev+57d76ad979b843e6973e7855ac1f0144",
        "active": true,
        "tos": false,
        "subtype": "",
        "token": {
            "user_id": "10008",
            "token": "0437c1ce3b7079906e2ff247aad1adda",
            "expiry": 1473821786,
            "refresh_token": {
                "user_id": "10008",
                "token": "2693615fd2a46edf13334b3f35580e26",
                "expiry": 1476327386,
                "created": 1473735386
            }
        }
    }
}

GET /auth

Use this URL when you need to provide the user with a button or link to redirect to VSee Clinic. The URL will follow this pattern

https://vclinic.vseepreview.com/auth?sso_token={token}&next={next_url}

e.g

https://vclinic.vseepreview.com/vc/next/auth?sso_token=66bcd0acff324e8a44992d9596b5d361&next=/u/clinic

This will log user in, then redirect user to

https://vclinic.vseepreview.com/vc/next/u/clinic

Parameters

Parameter

Type

Description

sso_token

String

SSO token from https://vsee.atlassian.net/wiki/spaces/VD/pages/14942243/User+API#POST-%2Fusers%2Fsso API response

next

String

URL path to redirect the user to after login

one_time_token

String

1 - invalidate the sso_token after login. This is optional for additional security.

disable_navigation

String

1 - disable all email communication

POST /users/login.json [public access]

...

  1. user_type will be member(200), provider(400), …, etc

  2. There is 2 methods for log in

    1. active user

      1. use username and password field

    2. inactive user

      1. user email and email token sent to their email

      2. only after user update their password via API, their status will change to active and can log in via active user log in method above.

Parameters

Parameter

Type

Description

username

String

(for active user only)

password

String

(for active user only)

email

String

(for non-active user who has not set the password yet)

email_token

String

(for non-active user who has not set the password yet)

Response

Note: you can use the token.token return here to redirect user from your portal to VSee Clinic portal, please see Section Web log in using SSO Token.

...