Now, let's build Instant Connect (IC) meeting links programmatically.
You will need a Webex API access token to make calls to the IC API. You have two options:
-
Your personal token for development purposes.
-
A bot token for production use.
In this lab we will use a bot token.
-
Go to https://developer.webex.com/docs/bots and click on Create a Bot
-
Select your Bot name (for example 'Video Expert'), and an icon of your choice.
-
Choose your bot username, this has to be unique. For example, you could do something 'lab-wx1-yourusername'
-
App Hub Description: we won't be publishing this bot to App Hub, but it is a good practice to add a meaningful description that will help you remember the purpose of the bot. For example, you can type something like 'This is the bot used for my wx1 lab 2857: 'Webex Connect with Instant Connect for video customer interactions'
-
Click on Add Bot and Copy your token!! to a safe place, we will use later:
This section will provide meeting links for host (expert) and guest (end customer) users.
-
Open Postman.
-
Select New and HTTP:
-
Rename your new Postman request to:
Get Meeting Links
-
Choose POST as the request type, and enter the UL as:
https://mtg-broker-a.wbx2.com/api/v2/joseencrypt
-
Select the Auth tab, and set Type as:
Bearer Token
.Enter the value of the bot token saved previously:
-
On the Headers tab, add a header:
- Key:
Content-Type
- Value:
application/json
- Key:
-
Go to the Body for the request, select raw and JSON and enter this JSON object:
{ "jwt": { "sub": "Instant Connect Meeting " }, "aud": "a4d886b0-979f-4e2c-a958-3e8c14605e51", "provideShortUrls": true, "verticalType": "gen", "loginUrlForHost": false }
Details/descriptions:
-
sub
(Subject) string value can be whatever you like as long as it is unique for each meeting. -
aud
indicates the audience for which the jwt is intended. In this case it is Cisco, and the value is always the same. -
jwt
withsub
andaud
are mandatory parameters, the rest are optional. -
provideShortUrls
: Default:false
. If set totrue
, the response will have shortened data portions of the meeting URL. It will also contain a shortened base URL, you will learn later how to use this data. -
verticalType
: Default:hc
. Currently takes two values,gen
for general flow, andhc
for healthcare flow. -
loginUrlForHost
: Defaulttrue
. Relevant only ifprovideShortUrls
is true. If set tofalse
, the short URL for hosts will be non-login links which means the host won't have an option to login for the meeting.
-
-
Save the request, and click on Send.
You should have received a body like this in the API response:
{
"host": [
{
"cipher": "eyJwMnMiOiJpNmZta3dp...cWl3ZGw2cjFuSkg0bEUj",
"short": "oCVp2LD"
}
],
"guest": [
{
"cipher": "eyJwMnMiOiJEQVdaHOBS...RDTvlZ-aLLRdIMSmCwEc",
"short": "ckmNR7I"
}
],
"baseUrl": "https://instant.webex.com/visit/"
}
Note: cipher values are truncated in the sample above.
Forming the meeting links is as simple as taking the baseUrl
value and concatenating the values in short
.
In this example, https://instant.webex.com/visit/oCVp2LD
for the host and https://instant.webex.com/visit/ckmNR7I
for the guest.
Now you only need to share the host URL with the expert providing support, and the guest URL with the end customer asking for support !!
This can be done by email, SMS, be integrated into some web portal, CRM, EMR, etc. In the next steps, you will learn how to do it in a digital channel like WhatsApp using Webex Connect.