Dialler API

The documentation of the Dialler Web Services, consists of this page and its Swagger implementation.

This page will focus on detail and information needed before using the web service, and additional information not covered in the Swagger implementation.

All examples below target our development server. To use the equivalent production server, remove the dev part from the server name, e.g. change devapi.puzzel.com to api.puzzel.com.

Authentication

All endpoints for the Dialler Web Services, requires a valid access token. This token is generated by authenticating against the Authentication Web Service.

Details on the Authentication Web Service, is not available here. However, a simplified example on how to use the service on the development platform, is shown below.

Web Request and Web Response

The web request requires a valid customer key, a user account and the account password. These credentials are not the same on the production environment.

POST https://devauth.puzzel.com/api/authenticate/loginContent-Type: application/json{  "CustomerKey":"{your customer key}",  "UserName":"{your user account}",  "Password":"{user account password}"}

The web response returns the access token, if the HTTP Status Code is 200.

HTTP/1.1 200 OKContent-Type: application/json; charset=utf-8{  "accessToken": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.TRUNCATED",  . . . }

Authorization: Bearer {accessToken}

All further web request must contain the Authorization: Bearer {accessToken} field, like this:

GET https://devapi.puzzel.com/dialler/...Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.TRUNCATED { .. }

Swagger

Before using the Dialler Web Services Swagger implementation, an access token is required.

The following shows how to get the token on the development platform:

  • In a web browsergoto https://devauth.puzzel.com/swagger/.
  • Click the link /api/Authenticate/LogIn.
  • In the Value box for the cred parameter, enter the credentials.
  • Click the Try it out! button.
  • In the Response Body box, copy the accessToken value.

The access token is now retrieved. Continue to the Swagger implementation, and follow these steps:

  • In your favorite Notepad application, construct a line that contains the Authorization value, Bearer{space}{accessToken}, e.g. Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.TRUNCATED.
  • In the Swagger implementation, input the Authorization value in the api_key box, in the upper right corner.
  • Click the Explore button.
  • The Swagger implementation will now make use of the Bearer token.

Published

17/08/2020 - 17:00

Last updated

24/09/2020 - 10:40
7
2