Developers

Getting a token

To work with most API methods you need to obtain the user's access_token.

1. Opening the authorization dialog – https://id.tviply.com/oauth

Parameters:

  • client_id – The identifier of your application.
  • redirect_uri – The address the user will be redirected to after completing authorization.

Example request:

https://id.tviply.com/oauth?client_id=1&redirect_uri=https://example.tv/oauth_back

If the user is not signed in to Tviply, the dialog will prompt them to sign in.

2. Getting the code

After the application is successfully authorized, the user's browser will be redirected to the redirect_uri specified when the authorization dialog was opened.
The code for obtaining the access key will be passed as a GET parameter:

https://example.tv/oauth_back?code=67c5e3b9f3d2fad016b4cee7c7b9c711

3. Getting the access_token

To obtain the access_token you need to make a request from your server to https://id.tviply.com/oauth/access_token, passing the following parameters:

Parameters:

  • client_id – The identifier of your application.
  • client_secret – The secret key of your application.
  • redirect_uri – The address that was used to obtain the code at the first authorization step.
  • code – The temporary code received after completing authorization.

Example request:

https://id.tviply.com/oauth/access_token?client_id=1
&client_secret=2a8ccfd229e40c67a013d9024a129c09e5f9402258e427207cab5aaba6829d69
&redirect_uri=https://example.tv/oauth_back
&code=67c5e3b9f3d2fad016b4cee7c7b9c711

The email and the access_token access key for the API methods will be returned in the response.

Further in the documentation access_token will be referred to as token

Methods API

My

Create