cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
421
Views
0
Helpful
2
Replies

How to map webex hook callback to the associated webex meeting

Anubis1
Level 1
Level 1

Hello,

I am using webex webhooks to receive meeting participant joined/left events in (near) real-time. This works fine. Onece I get a webhook callback, I need to find the related webex meeting. This is where I am having difficulties.

The webhook callback payload doesn't contain the meeting Id (e.g.f18b8a58266746eb93198b925d39de97), but, I think, a meeting-instance Id (e.g. f18b8a58266746eb93198b925d39de97_I_237607385244279949). I know I can query the webex RestAPI with this Id and get the meeting Id. But I'd like to avoid an additional HTTP request. What I'm currently doing is stripping out the part after the first underscore (e.g. _I_237607385244279949). But this is an ugly hack.

How should I create the webex meeting so that I get the meetingId in the webhook payload. I don't need to create a meeting series, just a one-off meeting.

Following is the meeting creation RestAPI request.

{
            "timezone":"America/Chicago",
            "title":"some title",
            "invitees":[
               {
                  "coHost":true,
                  "email":"<email>",
                  "displayName":"<name>"
               }
            ],
            "agenda":"some agenda",
            "start":"2022-09-04 19:00:00",
            "hostEmail":"<hostEmail>",
            "siteUrl":"<siteUrl>",
            "end":"2022-09-04 20:00:00",
            "enableConnectAudioBeforeHost":true,
            "publicMeeting":false,
            "sendEmail":true,
            "password":"<password>",
            "enabledJoinBeforeHost":true,
            "reminderTime":0,
            "enabledAutoRecordMeeting":false,
            "integrationTags":[
               "12345"
            ],
            "allowAuthenticatedDevices":false,
            "allowAnyUserToBeCoHost":true,
            "excludePassword":false,
            "allowFirstUserToBeCoHost":false,
            "joinBeforeHostMinutes":0,
            "enableAutomaticLock":false
         }

Following is the payload I receive with the webhook callbacks when a partifipant joined/left a meeting.

{
      "message":"webex meeting event hook triggered",
      "data":{
         "targetUrl":"<appUrl>/meetingParticipants-left",
         "name":"Webhook: meetingParticipants left",
         "data":{
            "state":"left",
            "siteUrl":"<siteUrl>",
            "hostPersonId":"Y2lzY29zcGFyazovL3VzL1BFT1BMRS9lNWMwN2I3OC01NjA5LTQzNzgtODhlMS02ZjQwYTEzMzdlOTg",
            "devices":[
               {
                  "deviceType":"GCC_OS_BrowserClient",
                  "joinedTime":null,
                  "correlationId":"6e16fb02-cbc5-4afb-ba2e-7bbdbec32005",
                  "leftTime":"2022-09-04T16:36:19Z"
               }
            ],
            "hostEmail":"<email>",
            "displayName":"<name>",
            "orgId":"<orgId>",
            "meetingId":"f18b8a58266746eb93198b925d39de97_I_237607385244279949"
         },
         "created":"2022-05-17T19:17:46.920Z",
         "event":"left",
         "ownedBy":"org",
         "orgId":"Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi82YzA1MzFjZS0wYjg4LTRlM2MtYjE0Yy1hNGI5ZjE0OTZjODg",
         "resource":"meetingParticipants",
         "status":"active",
         "createdBy":"Y2lzY29zcGFyazovL3VzL1BFT1BMRS9lNWMwN2I3OC01NjA5LTQzNzgtODhlMS02ZjQwYTEzMzdlOTg",
         "appId":"Y2lzY29zcGFyazovL3VzL0FQUExJQ0FUSU9OL0NkZTRkYzgyNTYzZDRmZjA0OTkxZWY5NTJlNDYxMmM0NWM2ZDlkMThmNWMzMmMwMmI5Nzk2ZmJjNmIzYjUwYzkx",
         "id":"Y2lzY29zcGFyazovL3VybjpURUFNOmV1LWNlbnRyYWwtMV9rL1dFQkhPT0svNjEyMzUzZTItMmE4ZC00ZjQyLWEzNjctMTZlM2YxNTM0NWJm"
      }
   }

 

2 Replies 2

Raffaele Lagana
Cisco Employee
Cisco Employee

The meetingId in the format XXXX_I_XXXX is already the meeting instance ID. That is the meeting ID of a single instance of the meeting. By default, when a meeting is created it is a meeting Series. Even if you only create one meeting, it will be created as a meeting Series, that will only contain one meeting. So in essence, I don't see a reason where you need to truncate the meeting instance ID, to remove the _I_XXXX part of it. This instance ID can be used with the /meetings API to get the meeting information. If you have a necessity to use the meeting series ID (the one without the _I_XXXX format) then you would need to have code logic to truncate it. The webhook will return the meeting instance ID by default.

I don't see a reason where you need to truncate the meeting instance ID


When a meeting is created, I get the meetingSeriesID (I actually don't need a series, but a one-off meeting. But this is what webex do as you mentioned). I store the meetingSeriesID.

Now, when I receive a webhook event, I need to map it to the corresponding meeting (i.e.meetingSeriesID). I think this is a very practical requirement in an automated application.

Nevertheless, thank you for the reply. It seems I will have to manually truncate the _I_XXXX part as I'm doing now.

For the sake of completeness, I can query using the meetingInstanceId and get the meetingSeriesId. But I don't wish to do it. This is time consuming and it affects my application logic/performance (e.g. I am doing this in an atomic operation).