Real-time client contact information on every display

Define and show your most important insights


Quick start

Make sure you’ve read Getting Started.

About

Client contact centers possess a lot of data, for example on Agents, Queues and Trunks. KPN has extensive experience in collecting data from these client contact centers to create valuable insights and powerful dashboards. This service is now available for anyone with a Dashboard Server API. The Dashboard Server API is available in the sandbox environment, using mock data that represents a client contact center. It returns a JSON object. It can also modify the contents of the response per user. This is available for you to experience the possibilities. To take this API into production, KPN needs to implement the data collectors on your (on-premise) client contact center solution. In your dashboard you can apply for the production Dashboard Server API after which KPN follows up on your request.

How it works

To get started and test the API from your local workstation you can use Postman or our API Reference (powered by SwaggerHub) or cURL as an HTTP client. If you use the Postman collection or API Reference, make sure you update the environment settings with your credentials in order to authenticate.

 

 

 

If you use cURL scroll down to see the examples. The following diagram shows how the Dashboard Server flow works:

 

 

Connect to the API

To start testing the API you need to get authorization credentials. Log in to your account and create a developer app on the My Apps page. The steps to create a developer app are briefly discussed under 'Support' 🡆 'Frequently Asked Questions'.

Get access token

Copy your app's credentials and replace APP_CONSUMER_KEY and APP_CONSUMER_SECRET with the copied values, then execute the below cURL command to receive access token.


curl -X POST \
 'https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials' \
 -H 'content-type: application/x-www-form-urlencoded' \
 -d 'client_id=APP_CONSUMER_KEY&client_secret=APP_CONSUMER_SECRET'

Note: If you are using cURL for Windows then please use below command.


curl -X POST "https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials" -H "content-type: application/x-www-form-urlencoded" -d "client_id=APP_CONSUMER_KEY&client_secret=APP_CONSUMER_SECRET"

The authorization service returns a JSON message that contains the access token field.

{
    "refresh_token_expires_in": "0",
    "api_product_list": "[Dashboard - KPN]",
    "api_product_list_json": [
        "Dashboard - KPN"
    ],
    "organization_name": "kpn",
    "developer.email": "demo123@kpn.com",
    "token_type": "BearerToken",
    "issued_at": "1521039195424",
    "client_id": "2Xvp2YLhEeT8w4cXQWvKuOpMoHQQ9zGx",
    "access_token": "haf2SDl07E9N7RluNQ4kJ1TkGgso",
    "application_name": "6e38ed2d-48b1-4362-97d6-04254065d79c",
    "scope": "",
    "expires_in": "3599",
    "refresh_count": "0",
    "status": "approved"
}

Dashboard Server using access token

Copy your access_token and replace access_token with the copied value, then you can execute cURL command to access 'client contact center data' by calling the endpoints of the KPN Dashboard Server API.

You can use same token to make multiple API calls, provided the token is active. If the token expires then you can repeat the above step 'Get access token'.


curl -X GET \ 
'https://api-prd.kpn.com/data/kpn/dashboard-server/trunks' \
  -H 'authorization: Bearer access_token'

Note: If you are using cURL for Windows then please use below command.


curl -X GET "https://api-prd.kpn.com/data/kpn/dashboard-server/trunks" -H "authorization: Bearer access_token"