API menu

WeSeeDo Direct Documentation

*This documentation applies to version 2 of the WeSeeDo Direct API.


Send an API request

This API request retrieves a list of meetings of the WeSeeDo Direct v2 API.

Copy the code, paste it into the command prompt of a terminal and press ENTER
curl -X GET "https://virtserver.swaggerhub.com/kpn/weseedo-direct-weseedo/Mock_WeSeeDo_v2/direct/meetings?user=58f6ee406a2308a38ca39dec&room_available_till=2020-03-18T14%3A15%3A00.000Z" -H "accept: application/json"

Introduction

The WeSeeDo Direct API helps you to implement a one-way or two-way, safe and live visual connection in your existing software packages. It enables you to watch and assist customers during a telephone conversation, while the telephone connection remains.

You can integrate the WeSeeDo Direct API within your existing company processes and your own applications using OAuth2, but Single Sign-On integrations such as ADFS are possible as well. WeSeeDo Direct does not store any data other than the metadata you provide for the meetings.

API specification

Test the API on SwaggerHub

Base URL

https://api-prd.kpn.com/communication/weseedo/weseedodirect

Conceptual model

WeSeeDo WeSeeDo Direct conceptual model

Definitions

Agent

A person working for an agency or company that deals with customer queries.

Participant

A person or customer who reports incidents to the agent.

API workflow

WeSeeDo WeSeeDo Direct API workflow

Automatic agent login workflow

WeSeeDo WeSeeDo Direct agent autologin workflow

Requirements

Participant

A mobile device with:

  • A camera.
  • An adequate internet connection, minimum 3G or wifi.
  • A WebRTC supported browser.

Agent

  • A WebRTC supported browser, preferably Google Chrome.
  • A camera is required when using bi-directional video.

Features

  • One-way or two-way visual connection.
  • Direct image of location/situation on site.
  • Existing telephone calls will continue to work.
  • Agents can take pictures of location or situation on-site in the web browser (optional).
  • Agents can chat with participants (optional).

Constraints

  • There might be some country specific restrictions depending on the country you want to send a SMS to. If you need help, please contact our User support.

Getting started

Make sure you've read What's in it for you for more info on how to register and start testing APIs.

Authentication

The API follows the KPN Store API Authentication Standard to secure the API. It includes the use of OAuth 2.0 client_id and client_secret to receive an access token.

Go to the Authentication tab on top of this page to find out how to:

  • Authenticate to an API using cURL.
  • Authenticate to an API on Swaggerhub.
  • Import Open API Specifications (OAS), also called Swagger files into Postman.

How to...

You must send the version of the API in the request header: "api-version: v2". This section shows a selection of API requests. Go to the API specification to see all requests.

Create new users

This endpoint allows you to create new agent users.

Send a request to the POST /management/users endpoint with the details of the user.

  • If you set a password:
    • Production users will be able to log in directly to WeSeeDo production using the provided email and password.
    • Sandbox users will be able to log in directly to WeSeeDo sandbox using the provided email and password.
  • If you don't set a password, users will receive an e-mail at the specified email with an activation link to create a password themselves.

The password must have a:

  • Minimum of 8 characters.
  • Minimum of 1 lower case character.
  • Minimum of 1 uppercase character.
  • Minimum of 1 number.

We will create a sandbox demo user on your behalf so you can explore the API functionality. You will receive its user credentials (Gebruikersnaam/Wachtwoord) for the WeSeeDo sandbox by e-mail.

Request

POST /management/users

Request body example
{ "first_name": "John", "last_name": "Doe", "password": "Password12344321", "role": "agent", "email": "John.Doe@email.nl", "locale": "nl" }

Response

Response example
{ "success": true, "result": { "id": "5f807e28ac0c2a2958f14d99", "first_name": "John", "last_name": "Doe", "name": "John Doe", "email": "John.Doe@email.nl", "photo": null, "locale": "nl", "role": "agent", "created_at": "2020-10-09T15:13:44.167Z", "sites": [], "entity": { "type": "company", "id": "5f6e1cbd70d9e4667019b299", "name": "Company", "package": { "id": "5d8b63a192975c6fab79ef99", "name": "WeSeeDo Direct | Pay as you Go | KPN", "features": [ ] } }, "suspended": false } }

The id of the newly created agent user is the user id of the agent that you will use in subsequent requests.

Retrieve user details

Retrieves the details of a specific user.

Request

GET /management/users/{id}

For example:

cURL request example
curl -X GET "https://api-prd.kpn.com/communication/weseedo/weseedodirect/management/users/5f807e28ac0c2a2958f14d99?user_status=true" -H "accept: application/json" -H "api-version: v2" -H "Authorization: Bearer 12345nwY3A4CJelyg8OgEAJ12345"

Parameters

Field Description
api-version Header parameter: Add v2 to make a request to version 2 of the API. Example: "api-version: v2"
id Path parameter: Replace {id} with the user id. Example: /users/5f807e28ac0c2a2958f14d99
user_status Query parameter (optional): Select true if you want to include the user status into the response. Select false if you don't. Status can be online or offline. Example: user_status=true

Response

The server will provide a response similar to the response below:

Response excerpt
{ "success": true, "result": { "id": "5f807e28ac0c2a2958f14d99", "first_name": "John", "last_name": "Doe", "name": "John Doe", "email": "John.Doe@email.nl", "photo": null, "locale": "nl", "role": "agent", "created_at": "2020-09-25T16:51:31.816Z", "sites": [], "entity": { "type": "company", "id": "5f6e1cbd70d9e4667019b2a0", "name": "Company", "package": { "id": "5d8b63a192975c6fab79ef33", "name": "WeSeeDo Direct | Pay as you Go | KPN", "features": [ ... ] } }, "suspended": false } }

Update user details

Updates the details of a specific user. If you want to update the user details partially use PATCH, if you want to update them completely use PUT.

Request

PUT/management/users/{id} or PATCH/management/users/{id}

Parameters

Field Description
api-version Header parameter: Add v2 to make a request to version 2 of the API. Example: "api-version: v2"
id Path parameter: Replace {id} with the user id. Example: /users/5f807e28ac0c2a2958f14d99
user_status Query parameter (optional): Select true if you want to include the user status into the response. Select false if you don't. Status can be online or offline. Example: user_status=true

Request

Request body example
{ "first_name": "string", "last_name": "string", "locale": "string" }

Response

Response example
{ "success": true, "result": [ { "id": "58..82", "first_name": "Testfirstname", "last_name": "Testlastname", "name": "Testfirstname Testlastname", "email": "agent1@weseedo.nl", "locale": "nl", "role": "agent", "created_at": "2017-11-17T12:07:56.308Z", "company": { "id": "58..82", "name": "WeSeeDo B.V." } } ] }

Delete users

This endpoint allows you to delete individual users.

Request

DELETE/management/users/{id}

Parameters

Field Description
api-version Header parameter: Add v2 to make a request to version 2 of the API. Example: "api-version: v2"
id Path parameter: Replace {id} with the user id. Example: /users/5f807e28ac0c2a2958f14d99
user_status Query parameter (optional): Select true if you want to include the user status into the response. Select false if you don't. Status can be online or offline. Example: ?user_status=true"

Response

Response example
{ "success": true, "result": { "id": "5a..82" } }

Create a new meeting

This endpoint creates a new meeting.

Use an internationally formatted phone number (for example, +31612345678). Dutch formats 0612345678 and 12345678 are automatically converted to their international format +31612345678.

  • If you wish to have a one-way video stream (from participant to agent), specify stream_camera_two_way as false.
  • If you wish to have a two-way video stream, specify stream_camera_two_way as true.
  • If you have your own notification system in place for sending out text messages, and do not wish to use the WeSeeDo Direct SMS service, specify send_sms as false.

Request

POST/direct/meetings

Request body example
{ "agent": "58f6ee406a2308a38ca39dec", "phone": "+31612312312", "stream_camera_two_way": true, "invitation_sms": "Click on the link to join.", "send_sms": true }

Response

Response example
{ "success": true, "result": { "id": "6bbf64a9e13844d1d140d6e2", "company": { "id": "58h6aa8a0e14a4c24df20760", "name": "Company 1", "contact": { "id": "784d061c0856dc4c97774da7", "first_name": "Firstname", "last_name": "Lastname", "email": "contact1@weseedo.nl", "phone": "+31612345678", "language": "nl" } }, "room_id": "9Pusrq3Do43DAEQnOG9aCtLFfl2FoURd", "room_password": "O0p48P2TuMavG0EAtMSdpy4PbkO2h2", "stream_camera_two_way": true, "duration": 0, "room_created": "2020-03-27T18:43:07.000Z", "room_available_from": "2020-03-27T18:43:07.000Z", "room_available_till": "2020-04-03T18:43:07.000Z", "created_by": { "id": "58f6ee406a2308a38ca39dec", "name": "Firstname Lastname" }, "participants": [ { "username": "agent.89f6aa406a2307a38da39a4r", "name": "Agent 1", "id": "5aedbd02e138231a7c1d7719", "user": "58f6ee406a2308a38ca39dec", "email": "agent1@weseedo.nl", "initial_participant": true, "sessions": [ "sessions" ], "hash": "qj7OqoxSt2zK6S16my8VZ28N1IigzvNl_jMz42wlA8Dj59DKV0G8zAc6PJ8LvWiHx", "url": "https://login-direct.weseedo.nl/meeting/qj7OqoxSt2zK6S16my8VZ28N1IigzvNl_jMz42wlA8Dj59DKV0G8zAc6PJ8LvWiHx" }, { "username": "visitor.Cxo9uuYVYFAJDW47", "phone": "+3112312312", "id": "5aedbd02e138231a7c1d7820", "initial_participant": true, "sessions": [ "sessions" ], "hash": "wCPjvYM7yf7KBwGVU0OsFG6DVBAGqZ5s_6PFMcsoR0GBeKIF8AhkngSqUy9UXBubA", "url": "https://login-direct.weseedo.nl/meeting/wCPjvYM7yf7KBwGVU0OsFG6DVBAGqZ5s_6PFMcsoR0GBeKIF8AhkngSqUy9UXBubA" } ] } }

Unique URLs are created for all participants. You can use this URL to, for example, redirect an agent to the URL for this specific meeting straight away. The generated link will only be valid for this specific meeting.

If send_sms is specified as true, a text message is sent to the participant's smartphone. The participant needs to click on the secure link and allow access to the camera of the phone. The video will start streaming immediately to the agent.

Enable auto-login

This endpoint allows users to be able to automatically log in to the WeSeeDo Direct web interface by generating a login URL. Redirect the user to the generated URL to log the user in automatically without the need to enter a username and password.

Sign in a user with role agent or agent_assistant and receive URLs to access the agent dashboard. Your client needs to have permissions for the given agent ID in the request body. In case you are already signed in as agent with OAuth2, you will still receive the URLs to access the agent dashboard.

Request

POST/auth/autologin

Parameters

Field Description
api-version Header parameter: Add v2 to make a request to version 2 of the API. Example: "api-version: v2"
Request body example
{ "agent": "58f6ee406a2308a38ca39dec", "product": "direct" }

Response

The server provides a Redirect URL, which allows the agent to log in to the portal:

Response Redirect URL example
{ "success": true, "result": { "url": "https://login.weseedo.nl/#/conversation/adminK1TRnQ2hAErCEpfbXwtYBCtVhLepFoHTldaFN7ewTrYgpO9t3A5VZpzMxGnvrhJoRMoUG6HzYM25X2zo7MveGNO0ndlTwUzrt5zIHRwKWZSkSWsR48mQoNGbBoNmrxoRxFOYLzWiaJATWH3y5sTOV0yeI2gT7OdjoKTXk1S0iKcsqilyqy3APPDimgYAaK9G8zvFIyAlPQUm9IbhjbyUrWCf1F1tEjgZoR1pownJqRirEc2C96h7t5NAlF" } }

URLs to sandbox and production site

  • WeSeeDo sandbox: https://sandbox-direct.weseedo.nl/login/REPLACE_WITH_ACCESS_TOKEN_OF_AGENT.
  • WeSeeDo production: https://login-direct.weseedo.nl/login/REPLACE_WITH_ACCESS_TOKEN_OF_AGENT.

When using the URLs mentioned above, the agent will automatically be logged in and able to use the application.

The user interface also provides the ability to create meetings. If you want to prevent the agent from creating meetings that way and only want to add the agent to a specific WeSeeDo Direct session, you can redirect the user to the url that is generated when creating a meeting.

The given URLs send the participant to a limited web interface, which only allows to:

  • Wait for a participant to click the link in the SMS.
  • Perform the video call.
  • When the call ends, the agent is redirected to a page indicating that the call has ended. The normal user interface to schedule meetings will not be accessible to the agent.