Phonebridge Platform Documentation

Overview

Zoho's PhoneBridge Platform helps you build an integration between your PBX / Call Center solution and Zoho products. Upon completion, your customers can enjoy these features in their Zoho applications:

  • click-to-call

    Click-to-Dial

    Calling contacts from within a Zoho application, thereby providing contextual information.

  • call-popup

    Automatic call pop-ups

    Get instantaneous call pop-ups inside a Zoho application, whenever an incoming call is received.

  • call-logs

    Call logging

    Both incoming and outgoing calls will be automatically logged inside the Zoho application.

Authorization

Zoho PhoneBridge REST API supports OAuth protocol to enable users access data in a secured way.

All the PhoneBridge API's need to be authenticated using an OAuth token.

Note: Following details will be provided post the registration of your application as a Provider with Zoho PhoneBridge

Client Id:

Client Secret for US:

Client Secret for EU:

Access Token Generation

To get the Access Token, you would need to follow the below two steps.

  • Obtain the Authorization Code.
  • Obtain the Access Token using the Authorization Code obtained in the first step

Obtaining Authorization Code

To obtain the authorization code, you would need to request the below given URL along with the parameters mentioned below.User will be prompted to login, if not logged in already. On successful login, user will be taken to the access grant page.Once user grants access, the authorization code will be sent to the redirect url. Authorization code is valid only for a minute.

Request URL

https://accounts.zoho.com/oauth/v2/auth

Request Method

GETTo get authorization code

Parameters

Parameters NameData Type Description
scope *StringThe scope required for your Application.
client_id *StringClient id given post registration.
state *StringProvides any state that might be useful to your application upon receipt of the response. The Zoho Authorization Server round-trips this parameter, so your application receives the same value it sent. Possible uses include redirecting the user to the correct resource in your site, and cross-site-request-forgery mitigations.
redirect_uri *StringRedirect urls provided during the registration.
access_type *StringIt will be always offline.

Examples

Example Request:

https://accounts.zoho.com/oauth/v2/auth?scope=PhoneBridge.call.log,PhoneBridge.zohoone.search
&client_id=&redirect_uri=&state=&response_type=code&access_type=offline

Sample Response will be any one of the following

&state=&code=&location=us&accounts-server=https://accounts.zoho.com

&state=&code=&location=eu&accounts-server=https://accounts.zoho.eu

Obtaining Access Token using the Authorization code if the param value for location is 'us'

To get the OAuth token you would need to make a POST request to the below given URL along with the parameters mentioned below. Response to this POST request will contain the access token and refresh token.

Note: Access Token has an expiry of 1 hour, once it is expired you would need to generate a new access token using the refresh token.You would need to store the Refresh token in your end as it will be available in the response only during the first time invoke of the access token API call.

API Details

Request URL

https://accounts.zoho.com/oauth/v2/token

Request Method

Post

Parameters

Parameters NameData Type Description
code *String
client_id *StringClient id given post registration.
client_secret *StringClient Secret for US given post registration.
redirect_uri *StringRedirect urls provided during the registration.
grant_type *StringIt will be always authorization_code.

Examples

Sample request:

https://accounts.zoho.com/oauth/v2/token?code=&client_id=&client_secret=&redirect_uri=&grant_type=authorization_code

Error Responses:

{"access_token": "" 
  "refresh_token":"",
  "expires_in_sec": 3600,
  "api_domain":"https://www.zohoapis.com",
  "token_type": "Bearer",
  "expires_in": 3600000}

Obtaining Access Token using Refresh Token

To generate the access token using refresh token, you would need to make a POST request to the below given URL along with the parameters mentioned below. Response to this POST request will contain the new access token

API Details

Request URL

https://accounts.zoho.com/oauth/v2/token

Request Method

Post

Parameters

Parameters NameData Type Description
refresh_token *String
client_id *StringClient id given post registration.
client_secret *StringClient Secret for US given post registration.
redirect_uri *StringRedirect urls provided during the registration.
grant_type *StringIt will be always refresh_token.

Examples

Sample request:

https://accounts.zoho.com/oauth/v2/token?refresh_token=&client_id=&client_secret=&redirect_uri=&grant_type=refresh_token

Error Responses:

{"access_token": ""
  "expires_in_sec": 3600,
  "api_domain":"https://www.zohoapis.com",
  "token_type": "Bearer",
  "expires_in": 3600000}

Obtaining Access Token using the Authorization code if the param value for location is 'eu'

To get the OAuth token you would need to make a POST request to the below given URL along with the parameters mentioned below. Response to this POST request will contain the access token and refresh token.

Note: Access Token has an expiry of 1 hour, once it is expired you would need to generate a new access token using the refresh token.You would need to store the Refresh token in your end as it will be available in the response only during the first time invoke of the access token API call

API Details

Request URL

https://accounts.zoho.eu/oauth/v2/token

Request Method

Post

Parameters

Parameters NameData Type Description
code *String
client_id *StringClient id given post registration.
client_secret *StringClient Secret for US given post registration.
redirect_uri *StringRedirect urls provided during the registration.
grant_type *StringIt will be always authorization_code.

Examples

Sample request:

https://accounts.zoho.eu/oauth/v2/token?code=&client_id=&client_secret=&redirect_uri=&grant_type=authorization_code

Error Responses:

{"access_token": "" 
  "refresh_token":"",
  "expires_in_sec": 3600,
  "api_domain":"https://www.zohoapis.eu",
  "token_type": "Bearer",
  "expires_in": 3600000}

Obtaining Access Token using Refresh Token

To generate the access token using refresh token, you would need to make a POST request to the below given URL along with the parameters mentioned below. Response to this POST request will contain the new access token

API Details

Request URL

https://accounts.zoho.eu/oauth/v2/token

Request Method

Post

Parameters

Parameters NameData Type Description
refresh_token *String
client_id *StringClient id given post registration.
client_secret *StringClient Secret for US given post registration.
redirect_uri *StringRedirect urls provided during the registration.
grant_type *StringIt will be always refresh_token.

Examples

Sample request:

https://accounts.zoho.eu/oauth/v2/token?refresh_token=&client_id=&client_secret=&redirect_uri=&grant_type=refresh_token

Error Responses:

{"access_token": ""
  "expires_in_sec": 3600,
  "api_domain":"https://www.zohoapis.eu",
  "token_type": "Bearer",
  "expires_in": 3600000}