Click To Dial Example

In this example, we'll test the Click To Dial API functionality. We will go through the setup and query required to access the Click To Dial API.

Create a Service User

Within Chronicall, create a new Service User. This will provide us with an authentication key.

  • Create a new user in User Management > User Accounts.
  • Click the User drop-down menu and select .
  • Enter a name in the Name field and select the "Service User" option at the bottom.
  • Save your changes.

Once completed, you will find the authentication key within API Enablement > Service Users.

403

Download Postman

Download and install the Postman application at the Postman Site.

Configure a Query

Launch Postman.

Create a new Request.

  • We'll name the Request "API Demonstration".
  • You may also need to create a "Collection." We'll call ours "Sample Collection".

Now that we have a request, we will first update the URL query.

  • Change the API type to "POST".
  • Replace the request URL with http://localhost:9080/rest/api/v1/agents/{Your AgentId}/click-to-dial
490

Next we'll configure the Authorization.

  • Within Postman, click the Authorization tab.
  • Set the Type to Bearer Token.
  • Copy the Service User Authentication Key, which is found in API Enablement > Service Users, and paste it here.
1106

Next we'll configure the Header.

  • Within Postman, click the Headers tab.
  • Add "Content-Type" in the Key field.
  • Add "application/json" in the Value field.
1103

Lastly, we'll configure the Body.

  • Within Postman, click the Body field.
  • Among the options listed below, select raw.
  • Follow the example request body and put that in the field below.
1103

Example Request Body:

{
  "externalPrefix" : "9",
  "numberToDial" : "8017132800"
}

We are now ready to submit our query. Click on Send within Postman. Upon success you will see the resulting 204 response below in the Response field.

1463

For incorrect queries:

Status CodeFailure

400 Bad Request

Malformed JSON request body.



401 Unauthorized



The authorization header wasn’t valid.



403 Forbidden



The authenticated user doesn’t have Chronicall access to view data on one or more of the requested agents or groups.