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.

2- OPTT generates “OPTT_Client_Code” and “OPTT_Secret_Code”, Grant_type for 3rd party, which are unique codes that 3rd party must use for requests.


Step 1:

How to get token:


API Inputs:

client_idThis is your company-specific code generated by OPTT
client_SecretThis is your company-specific code generated by OPTT
codeGet it from the identity provider by sending the client code and client secret
clinic_optt_idYour clinic ID in OPTT


You can try it at the following link:

Step 2:

you will receive the token and you should add this token to the end of the webview URL.




https:// 3rd

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.