Generating the token for application that use identity provider
How to get authorization via OAuth Access Tokens to call OPTT project API in your application.
If your IOS or Android application authorized users by an identity provider, you should follow these steps to getting an organization token:
In General:
1- The 3rd party embeds the OPTT dashboard in their app.
Step 1:
How to get token:
API Inputs:
Parameter | Description |
---|---|
client_id | This is your company-specific code generated by OPTT |
client_Secret | This is your company-specific code generated by OPTT |
code | Get it from the identity provider by sending the client code and client secret |
user_type | CLIENT |
clinic_optt_id | Your clinic ID in OPTT |
You can try it at the following link:
https://developers.optt.ca/v1.4/reference#gettokenbygoogleusingpost
Step 2:
you will receive the token and you should add this token to the end of the webview URL.
Example:
https:// 3rd party.mobile.app.optt.ca/client/digital-session/detail/5682/RUNNING?lang=en/?token=eyJhY2Nlc3NfdG9rZW4i
This token expires every 5 minutes (expiration time can get changed).
Step 3
Keep in mind you can use the same API for receiving tokens for existing users. If a user exists we are not going to duplicate it.
Updated over 3 years ago