SSO

get token of the internal or external users by sso

In this section, you will learn how to receive tokens from OPTT if you used standard SSO methods.

*Tip: This API does not require a authorize header.

When a new customer requests a connection
We manually create a username and pass for him. From now on, the customer must request a token with his username and pass, and we can expire the token every day for more security, and he must request a new token every day. Slow or refresh the token whenever you want to have a new token.
and the new customer sends us client id and client secret, he can take these two parameters from the panel of Google or Amazon or any other identity provider and send them to us.

1153

1- Request URL:


https://gwidev.eq.optt.ca/gateway/profile/institute/sso

2- Request method type:

POST

3- Request Input Parameters:


Body:

{
  "apiKey": "string",
  "clientId": "string",
  "clinicEmail": "string",
  "code": "string",
  "userType": "CLIENT"
  "redirect_uri":string,
}

Body Description:

Parameter Name

Parameter Type

Description

apiKey

string

This is your ID created by the username and password we gave you

clientId

string

it's generate from your identity provider

clinicEmail

string

This is the email of your clinic in OPTT

code

string

it's generate from your identity provider

userType

String

it should be on of this item:
[CLIENT, CAREGIVER ]

redirect_uri

String

This is the redirect_uri that customer informs to the identity provider.

  • if the app is native, this parameter should be sent as an empty string.

A complete example of an API call:

curl -X POST "https://gwidev.eq.optt.ca/gateway/profile/institute/sso" -H "accept: */*" -H "Authorization: bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTk5MjYyNTgsInVzZXJfbmFtZSI6Imluc3RpdHV0ZSIsImF1dGhvcml0aWVzIjpbIklOU1RJVFVURSJdLCJqdGkiOiIyZDMzNGY5YS01OWFmLTRjMzctOWE0OS1iMGU4NzBhNTQzZjQiLCJjbGllbnRfaWQiOiJvcHR0LTAyZWU3N2RjLWFjNDUtNDM0NC04MTdlLTE3Y2E1MmI1OGI1ZCIsInNjb3BlIjpbInJlYWQiLCJ3cml0ZSJdfQ.ANh2KLL4IfolkPfaJ3JsUYQTFkpKxlXT5vCKzkwhvJsqUO5eBSErYB5H6c2kQvB3EWfLlFZAo1QQAgbHpkUm776qijWcncv77uT-drBvscInvBu0ahQh96Fdn9eXnbXrCBgt80RsZKkFI4W7SrziiVpXlFuUjKL4Jm5CkuK5dmAB6nPXJGnKx0qqg0uHfuHsHvJxfeoiqwz481oJ48dUx8W-CVDDAo79twFfqCmAm_yy8kgJe67_nGYfWPu6wY9Z5YCDnLiVM6Ky8md-hcQhScTIRAHql7nebfUIPb8h_J7jQbhAg2IwVLp92Xccp_F9gmeOu4O6dWy08Amstt1l2A" -H "Content-Type: application/json" -d "{ \"apiKey\": \"string\", \"clientId\": \"string\", \"clinicEmail\": \"string\", \"code\": \"string\", \"userType\": \"INSTITUTE\"}"