Patient Outbounding SSO Workflow
Step 01: MDLIVE sends the User SSO OAuth Token to the client via a HTTP Redirection
Section titled “Step 01: MDLIVE sends the User SSO OAuth Token to the client via a HTTP Redirection”The client needs to provide MDLIVE one URL for test environment and one URL for production environment to receive the User SSO OAuth Token.
The URL should looks like: https://CLIENT_WEB_BASE_URL/mdlive/index.html#/sso/mdlive/token/USER_SSO_OAUTH_TOKEN
Please save the User SSO OAuth Token and it will be required in Step 03.
Step 02: Client uses api_key and password to get API Authentication Token
Section titled “Step 02: Client uses api_key and password to get API Authentication Token”HTTP Request
| No. | Item | Description |
|---|---|---|
| 1 | HTTP URL | {MDLIVE_BASE_URL}/auth/auth_token |
| 2 | HTTP Method | POST |
Header Parameter
| Parameter | Default |
|---|---|
| Content-type | application/json |
Request Body
| Attribute | Required | Description |
|---|---|---|
| auth | true | parent attribute of api_key and password |
| ↳ api_key | true | Unique api_key assigned to your team by MDLIVE |
| ↳ password | true | Unique password assigned to your team by MDLIVE |
Response Body
| Attribute | Description |
|---|---|
| jwt | API Authentication Token This token will be expired in 24 hours. |
Examples
| No. | Item | Examples |
|---|---|---|
| 1 | Request Example | curl -X POST \ https://stage-rest-api.mdlivetechnology.com/auth/auth_token \ -H ‘Content-Type: application/json’ \ -d ‘{ “auth”: { “api_key”: “mdlivedemoapikey”, “password”: “mdlivedemoapipswd” } }’ |
| 2 | Response Example | { “jwt”:“Please save the API Authentication Token and it will be required in Step 03” } |
Step 03: Client uses the User SSO OAuth Token (from Step 01) and the API Authentication Token (from Step 02) to obtain member information
Section titled “Step 03: Client uses the User SSO OAuth Token (from Step 01) and the API Authentication Token (from Step 02) to obtain member information”HTTP Request
| No. | Item | Description |
|---|---|---|
| 1 | HTTP URL | {MDLIVE_BASE_URL}/api/v1/sso_tokens/USER_OAUTH_SSO_TOKEN |
| 2 | HTTP Method | GET |
Header Parameter
| Parameter | Default |
|---|---|
| Authorization | API Authentication Token (from Step 02) |
Response Body
| Attribute | Description |
|---|---|
| patient | Patient Information |
| ↳ id | Patient MDLIVE User ID Please save this Patient MDLIVE User ID and link with your GUID/UUID for reporting purpose. |
| ↳ first_name | Patient First Name |
| ↳ last_name | Patient Last Name |
| ↳ gender | Patient Gender |
| ↳ birthdate | Patient Birthdate |
| Patient Email | |
| ↳ phone | Patient Phone Number |
| ↳ address1 | Patient Address1 |
| ↳ city | Patient Address City |
| ↳ state | Patient Address State |
| ↳ zip | Patient Address Zipcode |
| ↳ dermatology_price | Price for Dermatology Visit |
Examples
| No. | Item | Examples |
|---|---|---|
| 1 | Request Example | curl -X GET \ https://stage-rest-api.mdlive.com/api/v1/sso_tokens/N_k8zXDeVo0PjuFzApPWKQ== \ -H ‘Authorization: Please Copy The API Authentication Token (unexpired) from Step 02 and Paste Here.’ N_k8zXDeVo0PjuFzApPWKQ==, in this Request Example, is a demo member User SSO OAuth Token. Please replace this demo member User SSO OAuth Token with your own User SSO OAuth Token from Step 01. |
| 2 | Response Example | { “patient”:{ “id”:542128387, “first_name”:“oauth”, “last_name”:“sso”, “gender”:“Male”,, “birthdate”:“1980-08-08” “email”:“test@mdlive.com”, “phone”:“8004006354”, “address1”:“123 Test Road”, “city”:“FORT LAUDERDALE”, “state”:“FL”, “zip”:“33325”, “dermatology_price”:“$69.00” } } |
Step 04: Client uses the member information (from Step 03) to register the member or login the member into the client site.
Section titled “Step 04: Client uses the member information (from Step 03) to register the member or login the member into the client site.”The client can implement this step based on the client’s business logic.