KPN

Dashboard Server - KPN

KPN

Show real-time client contact information on every display

Stable and cost-efficient insights into agents, queues and trunks

  • Communication

API Button

Introduction

This 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 of the API. To take this API into production, we need to install data collectors on your (on-premise) client contact center solution. In your dashboard you can apply for the production Dashboard Server API after which we follow up on your request. Now you can start using the API in your own environment and create your insights.

How it works

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:

Sequence diagram

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"