Skip to main content
Skip table of contents

Quick Start guide (WeSeeDo Direct)

This page described how to quickly get started using the WeSeeDo API for WeSeeDo Direct

This implementation guide is for WeSeeDo Direct. Are you looking for the WeSeeDo Personal implementation guide? Click here.

Introduction

This document can be used as a practical reference guide to quickly get you started with the WeSeeDo API for WeSeeDo Direct.

After following this guide you should be able to schedule your first WeSeeDo appointment using the API.

For the management tasks in this documentation, you can also use our administrative user interface at https://admin.weseedo.nl.
Furthermore, if your WeSeeDo subscription is a Company or Dealer subscription, you can ignore the API parts for scopes that do not apply to you.
For example, if you WeSeeDo subscription is a Company subscription, you can create API credentials by following step 1, and then go straight to step 4.

The manual assumes that you are using the Sandbox environment. We highly recommend to build your API integration using our Sandbox environment to prevent incurring license fees for accidentaly created users.

Step 1: Log in to the administrative interface to create your API credentials

  1. Log in to the Sandbox management portal (https://sandbox-admin.weseedo.nl/ ) with the credentials provided by WeSeeDo.

  2. Go to the API tab

  3. Click on “Add Client”.

  4. Provide a name for the API credentials, and choose an entity for which the API Credential should be created; in this example we will create credentials for the Reseller itself.

  5. The API will provide the client_id and the client_secret when created.

Treat your client_secret as a password!
The client_secret will only be provided once after creation and can only be changed by resetting it to a new client_secret!

Step 2: Authenticate to the API

For more information about API authentication, refer to the Authentication page for more details.

To authenticate, we send a POST request to our OAuth2 token endpoint.

Send the following JSON request body:

JSON
{
	"grant_type": "client_credentials",
	"client_id": "REPLACE_WITH_THE_CLIENT_ID_CREATED_IN_STEP_1",
	"client_secret": "REPLACE_WITH_THE_CLIENT_SECRET_CREATED_IN_STEP_1"
}

The server will respond with an access token:

JSON
{
	"access_token": "d337cc7e8b4e0aab419803123a238fe8b946dbcbaf38466c19696dd839ab459b",
	"expires": "2020-12-31T23:59:59.999Z",
	"token_type": "Bearer"
}

In this case, our access token is: d337cc7e8b4e0aab419803123a238fe8b946dbcbaf38466c19696dd839ab459b

Save this token, we will use it in all subsequent API calls, send the token in the Authorization header as follows:

Step 3: Create a Dealer

If you subscription is not a Reseller or Dealer subscription, you can skip this step.

To create a Dealer, we need to send a POST request to the Dealer endpoint.

Send the following JSON request body:

JSON
{
	"name": "Test Dealer 1",
	"contact": {
		"first_name": "WeSeeDo",
		"last_name": "Developer",
		"email": "developer@weseedo.nl",
		"phone": "+31612345678",
		"language": "nl"
	},
	"notification_contact": {
		"email": "developer@weseedo.nl"
	}
}

The server will respond with a Dealer object:

JSON
{
	"success": true,
	"result": {
		"id": "5f0dda72990b490eec31cb40",
		"name": "Test Dealer 1",
		"contact": {
			"id": "5f0dda72990b490eec31cb41",
			"first_name": "Dev",
			"last_name": "Eloper",
			"email": "dealer1@weseedo.nl",
			"phone": "+31612345678",
			"language": "nl"
		},
		"notification_contact": {
			"id": "5f0dda72990b490eec31cb42",
			"email": "developer@weseedo.nl"
		},
		"reseller": {
			"id": "51abbd02e138231d7d1d8811",
			"name": "reseller 1",
			"contact": {
				"id": "51bbbd02e138231d7d1d8811",
				"first_name": "re",
				"last_name": "seller1",
				"email": "reseller1@weseedo.nl",
				"phone": "0612345678",
				"language": "nl"
			},

			"suspended": false
		},
		"suspended": false
	}
}

The result indicates that we have now successfully created a Dealer object with id 5f0dda72990b490eec31cb40

Save this id, we will use it in the next step to create a Company object.

Step 4: Create a Company

To create a Company, we need to send a POST request to the Company endpoint.

Send the following JSON request body:

JSON
{
	"name": "Test Company 1",
	"contact": {
		"first_name": "Developer",
		"last_name": "Developersen",
		"email": "developer123@weseedo.nl",
		"phone": "+31612345678",
		"language": "nl"
	},
	"package": "594a5befcc9d4f9e2f1da19a",
	"dealer": "5f0dda72990b490eec31cb40"
}

The server will respond with a Company object:

JSON
{
	"success": true,
	"result": {
		"id": "5f0ddd29990b490eec31cb4b",
		"name": "Test Company 1",
		"contact": {
			"id": "5f0ddd29990b490eec31cb4c",
			"first_name": "Developer",
			"last_name": "Developersen",
			"email": "developer123@weseedo.nl",
			"phone": "+31612345678",
			"language": "nl"
		},
		"package": {
			"id": "594a5befcc9d4f9e2f1da19a",
			"name": "premium",
			"features": [
				"weseedo_personal", "weseedo_direct", "weseedo_direct_2way", "chat",
				"agent_create_appointment", "weseedo_personal_sms", "button",
				"forward", "multiple_participants", "appointment", "send_file", "screenshot", "presentation_pdf",
				"presentation_powerpoint", "screensharing", "cobrowsing_simple", "convert_file", "waitingroom"
			]
		},
		"dealer": {
			"id": "5f0dda72990b490eec31cb40",
			"name": "Test Dealer 1",
			"contact": {
				"id": "5f0dda72990b490eec31cb41",
				"first_name": "Dev",
				"last_name": "Eloper",
				"email": "dealer1@weseedo.nl",
				"phone": "+31612345678",
				"language": "nl"
			},
			"notification_contact": {
				"id": "5f0dda72990b490eec31cb42",
				"email": "developer@weseedo.nl"
			},
			"suspended": false
		},
		"suspended": false
	}
}

The result indicates that we have now successfully created a Company object with id 5f0ddd29990b490eec31cb4b

Save this id, we will use it in the next step to create a User object and a Site object.

Step 5: Create a User

To create a User, we need to send a POST request to the User endpoint.

Send the following JSON request body:

JSON
{
	"first_name": "Test",
	"last_name": "Agent",
	"email": "testagent1@weseedo.nl",
	"password": "StrongPassword123!",
	"locale": "nl",
	"role": "agent",
	"entity": {
		"type": "company",
		"id": "5f0ddd29990b490eec31cb4b"
	}
}

The server will respond with a User object:

JSON
{
	"success": true,
	"result": {
		"id": "5f0dded4990b490eec31cb63",
		"first_name": "Test",
		"last_name": "Agent",
		"name": "Test Agent",
		"email": "testagent1@weseedo.nl",
		"photo": null,
		"locale": "nl",
		"role": "agent",
		"created_at": "2020-07-14T16:35:32.356Z",
		"sites": [],
		"entity": {
			"type": "company",
			"id": "5f0ddd29990b490eec31cb4b",
			"name": "Test Company 1",
			"package": {
				"id": "594a5befcc9d4f9e2f1da19a",
				"name": "premium",
				"features": ["weseedo_personal", "weseedo_direct", "weseedo_direct_2way", "chat",
					"agent_create_appointment", "weseedo_personal_sms", "button",
					"forward", "multiple_participants", "appointment", "send_file", "screenshot",
					"presentation_pdf", "presentation_powerpoint", "screensharing", "cobrowsing_simple", "convert_file", "waitingroom"
				]
			}
		},
		"suspended": false
	}
}

The result indicates that we have now successfully created a User object with id 5f0dded4990b490eec31cb63 and role agent

Save this id, we will use it in the next step, when creating the Site object we can immediately attach this User object to the Site object.

Because in the example request a password has been sent, this User will be able to login directly to https://sandbox.weseedo.nl after this User has been linked to a Site.
If the password is not included in the request, the User will receive a link to set a password at the specified e-mail address, after linking the user to at least one Site.

All necessary administrative steps have been completed, we are now ready to schedule our first WeSeeDo video call!

Step 6: Schedule a video call

Now that all administrative tasks are completed, we can start using the product. There are three common ways to get started, depending on your implementation scenario that will be described below.

  1. Logging in using the user interface by email address and password

  2. Logging in using the user interface by an API-generated login URL

  3. Schedule a WeSeeDo video call using the API, and embed it in your own application

Many other combinations of implementing our API are available. Refer to the full documentation at https://sandbox-api.weseedo.nl/api/v2/docs/

Option 1: Logging in by e-mail address and password

This method involves no further API actions. While creating the user, we have set an email address and password. If we would not have set a password, the user would receive a link to set a password by e-mail.

Go to https://sandbox-direct.weseedo.nl and log in using the email address and password. This will allow you to access the product and use it using our UI.

Option 2: Logging in by an API-generated login URL

When integrating the application, usually it us not desirable to have users login with their own email address and password, but provide some sort of automatic login mechanism.
To achieve this, we have exposed an autologin endpoint in our API that allows you to generate a login URL that will automatically log the user in.

Send the following JSON request body:

JSON
{
	"agent": "5f0dded4990b490eec31cb63",
	"product": "direct"
}

The server will respond with a Site object:

JSON
{
	"success": true,
	"result": {
		"url": "https://sandbox-direct.weseedo.nl/login/facd29e4158ad202333936854859952773bd0513d612d8e4be5dbe86cecd88a5"
	}
}

Simply redirect the user to the URL provided by the API, in this case: https://sandbox-direct.weseedo.nl/login/facd29e4158ad202333936854859952773bd0513d612d8e4be5dbe86cecd88a5

The user will automatically be logged in to WeSeeDo Direct and will be able to use the product from there.

Option 3: Schedule the call using the API, and embed it

To create a Meeting, we need to send a POST request to the Meeting endpoint.

Make sure to send the API call to the product endpoint for WeSeeDo Direct, and not WeSeeDo Personal!

Send the following JSON request body:

In the example, stream_camera_two_way is set to false, which means that the invitee will stream one-way video to the agent. Set the value of stream_camera_two_way to true to use bidirection video stream. A WeSeeDo Direct call is always without audio.

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

The server will respond with a Meeting object:

JSON
{
  "success": true,
  "result": {
    "id": "6bbf64a9e13844d1d140d6e2",
    "company": {
		"id": "5f0ddd29990b490eec31cb4b",
		"name": "Test Company 1",
		"contact": {
			"id": "5f0ddd29990b490eec31cb4c",
			"first_name": "Developer",
			"last_name": "Developersen",
			"email": "developer123@weseedo.nl",
			"phone": "+31612345678",
			"language": "nl"
		},
		"suspended": false
	},
    "room_id": "9Pusrq3Do43DAEQnOG9aCtLFfl2FoURd",
    "room_password": "O0p48P2TuMavG0EAtMSdpy4PbkO2h2",
    "stream_camera_two_way": false,
    "duration": 0,
    "room_created": "2025-03-27T18:43:07.000Z",
    "room_available_from": "2025-03-27T18:43:07.000Z",
    "room_available_till": "2025-04-03T18:43:07.000Z",
    "timezone_offset": 0,
    "created_by": {
		"id": "5f0dded4990b490eec31cb63",
		"name": "Test Agent"
	},
    "participants": [
      {
        "username": "agent.89f6aa406a2307a38da39a4r",
        "name": "Test Agent",
        "id": "5aedbd02e138231a7c1d7719",
        "user": "5f0dded4990b490eec31cb63",
        "email": "testagent1@weseedo.nl",
        "initial_participant": true,
        "hash": "qj7OqoxSt2zK6S16my8VZ28N1IigzvNl_jMz42wlA8Dj59DKV0G8zAc6PJ8LvWiHx",
        "url": "https://sandbox-direct.weseedo.nl/meeting/qj7OqoxSt2zK6S16my8VZ28N1IigzvNl_jMz42wlA8Dj59DKV0G8zAc6PJ8LvWiHx"
      },
      {
        "username": "visitor.Cxo9uuYVYFAJDW47",
        "phone": "+31612312312",
        "id": "5aedbd02e138231a7c1d7820",
        "initial_participant": true,
        "hash": "wCPjvYM7yf7KBwGVU0OsFG6DVBAGqZ5s_6PFMcsoR0GBeKIF8AhkngSqUy9UXBubA",
        "url": "https://sandbox-direct.weseedo.nl/meeting/wCPjvYM7yf7KBwGVU0OsFG6DVBAGqZ5s_6PFMcsoR0GBeKIF8AhkngSqUy9UXBubA"
      }
    ]
  }
}

In the response body you can see that there are are two participants. The agent itself, and the two people that are invited by the agent. For every participant a unique URL has been generated by our API.

If SMS notifications are enabled, the invitees will receive an SMS which contains the text that you have provided in the request body. The URL to the video call is automatically appended.

If you have your own notification system, you can set send_sms to false in the Meeting request body. In this case, WeSeeDo will not send any notifications. This will leave distribution of the invitation links to your application.

To get the meeting started, the agent can login to WeSeeDo via the method mentioned under step 1 or 2. Once a participant opens the generated link, the video call will start immediately. The order of events is not important, it does not matter whether the agent or the participant opens the link first.

You can also embed the generated links into iframes within your application.

When using iframes, you must set allow=”camera;microphone” to the iframe tag, otherwise the browser will deny access to request the camera and/or microphone.

You are now done scheduling your first WeSeeDo video call using our API!

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.