Welcome to Mindtalk Dev Resources

OAuth

Mindtalk support OAuth for authentication and authorization protocol. OAuth allows users to give permission for application to do their task without doing the password sharing. However, authorized task for application with OAuth have limited scope. You can read more about OAuth here: oauth.net.

To access OAuth feature, you need to create new application first. Here is the steps: Getting Started: Create New App.

Now you have your application ready, you only need to obtain the access token. You do not need to verify your application to gain the access token. You only need to prepare the parameters:

[CLIENT-ID]
[CLIENT-SECRET]
[APPS-REDIRECT-URI]

Then paste this URL on your browser and fill in the parameters:

http://api.mindtalk.com/v2/authorize?client_id=[CLIENT-ID]&client_secret=[CLIENT-SECRET]&redirect_uri=[APPS-REDIRECT-URI]&scope=write

After that, you will get the code to gain the access code.

[APPS-REDIRECT-URI]?code=[CODE]

With the [CODE], access the endpoint URL:

http://api.mindtalk.com/v2/access_token?code=[CODE]&client_id=[CLIENT-ID]&client_secret=[CLIENT-SECRET]&redirect_uri=[APPS-REDIRECT-URI]&scope=write

The return value is encoded URL:

access_token=[ACCESS-TOKEN-CODE]&refresh_token=[REFRESH-TOKEN-CODE]&track_id=[TRACK-ID]

Now you finally have your access token to gain OAuth feature.