Webhooks - Participant and Public User Notification

Support Center > API Integration

Published 06/17/2019 at 4:39am UTC

Page viewed 33377 times

Details

By default, SecureVideo automatically sends out e-mails or SMS notifications to all users when certain events occur. These notifications include session invites, updates, cancellations, reminders, and others. If you would prefer to send your own e-mails for notifications that are sent to your Public Users, you can receive webhooks that will allow you to create and send these notifications yourself.

Answer

Public User Notification Webhook

First, you must configure webhooks for your account. To do this, please see the article Webhooks - Overview. At the time you do this, please also advise the SecureVideo Support Team that you would like to enable Public User Notification Webhooks.

Once enabled, SecureVideo will no longer automatically send e-mail or SMS notifications to your public users; instead you will receive an HTTPS POST to your Custom Webhook URL containing the information you need in order to create and send an e-mail or SMS yourself, as follows:

{ 
"WebhookType":"NOTIFY_PUBLIC_USER",
"ID":183765,
"Status":"Update",
"EventTs":"2019-06-14T05:52:01",
"Attributes":[
{"AttributeName":"RecipientName","AttributeValue":"Perry Public"},
{"AttributeName":"RecipientEmailAddress","AttributeValue":"[email protected]"},
{"AttributeName":"RecipientSmsNumber","AttributeValue":""},
{"AttributeName":"RecipientTimeZone","AttributeValue":"Pacific Standard Time"},
{"AttributeName":"SessionHostUserId","AttributeValue":"24403"},
{"AttributeName":"SessionHostName","AttributeValue":"Dr. Josette Mondanaro"},
{"AttributeName":"SessionTimeUtc","AttributeValue":"2019-06-26T18:45:00"},
{"AttributeName":"SessionTimeLocal","AttributeValue":"2019-06-26T11:45:00"}
]
}

In the Webhook JSON:

  • WebhookType is the type of webhook you are receiving. For a Public User Notification Webhook, this will be "NOTIFY_PUBLIC_USER". In the future, other notification recipients are likely to be added, and those would have a different WebhookType starting with the word "NOTIFY_".
  • ID is the object relevant to the webhook, and depends on WebhookType. For "NOTIFY_PUBLIC_USER" webhooks, ID will be the User ID of the notification recipient.
  • Status is the status of the object relevant to the webhook, and depends on WebhookType. For "NOTIFY_PUBLIC_USER" webhooks, Status will be the type of notification that should be sent, and can have the following values:
    • Invite: participant is being invited to a session by the host, and should be instructed how to join the session.
    • Update: the scheduled time of the session has changed to the new time.
    • LongReminder: the session is starting in approximately 2 hours (this is configurable in your account settings).
    • ShortReminder: the session is starting in approximately 10 minutes (this is configurable in your account settings).
    • Cancellation: the session has been cancelled by the host.
    • DeclinedOrExpiredProposal: a request for a session has either been declined by all eligible hosts, or has gone answered and expired. The participant should be notified of this.
    • Welcome: the user account for the public user has been created, login instructions should be sent to the user.
  • EventTs is the timestamp in UTC that the event was generated. You can examine this to see if a notification event was created a long time ago and is now moot. (This can happen if, for example, your server goes down for a while, then someone schedules a "Meet Now" session with a Public User, and you don't receive the webhook for that notification until your server wakes up several hours later.)
  • Attributes: the Recipient attributes above are present for all types of notification (see Status); the Session attributes above are present only for session-related notifications (in Status, these would be Invite, Update, LongReminder, ShortReminder, and Cancellation).
    • RecipientName: the name of the session participant who will be receiving the notification.
    • RecipientEmailAddress: the e-mail address of the session participant who will be receiving the notification.
    • RecipientSmsNumber: the e-mail address of the session participant who will be receiving the notification.
    • RecipientTimeZone: the time zone of the session participant who will be receiving the notification. See list of time zone values.
    • SessionHostUserId: the user ID of the session host, or if a session request to an individual was declined, the user ID of the declining host.
    • SessionHostName: the name of the session host, or if a session request to an individual was declined, the user ID of the declining host.
    • SessionTimeUtc: the time the session is scheduled for, in UTC. If a cancellation, will be the time the session was scheduled for. If an update, will be the new scheduled time. If a declined proposal for a scheduled session, the #1 preferred time in the recipient's request.
    • SessionTimeLocal: the time the session is scheduled for, translated into the recipient's time zone.