Web SDK Installation
Initialization
The first step is to include the Styles (CSS) inside header tag and scripts (JS) inside body.
<!doctype html>
<html lang="en">
<head>
<link href="https://sdk.meetinglawyers.com/static/css/main.css" rel="stylesheet">
...
</head>
<body>
<script src="https://sdk.meetinglawyers.com/static/js/main.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
window.meetinglawyers.initialize({
apiKey: "q1H25k63o7G96o",
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
displayMode: "widget",
language: "en",
defaultOpen: false
})
}, !1)
</script>
...
</body>
</html>
Available initialization parameters:
| Key | Required | Type | Description |
|---|---|---|---|
apiKey | True | String | Key provided by MeetingLawyers identifying the company. |
jwt | True | String | Session token retrieved from server to server authentication process, explained in the next step. |
language | True | String | Available languages: Spanish (es), English (en), Portuguese (pt). |
displayMode | True | String | Defines the display mode of the SDK. Available modes: “fullScreen”, “widget”, “contained”. |
containerId | False | String | if displayMode=“contained”, this parameter specifies the container. |
defaultOpen | False | Boolean | if displayMode=“widget” and defaultOpen=true, the widget will automatically open after initialization. |
info
Initializing the widget with the parameter jwtMD (a JWT token from MeetingDoctors) is deprecated, and will be removed in next iterations.
Authentication
To retrieve the JWT for a specific user, you need to perform 2 calls to the server-to-server User API: