DynTube API
  • Welcome!
  • Key Concepts
  • Quick Start
  • Reference
    • Videos
      • Video Upload via File (Server Side)
      • Video Upload via URL (server side)
      • HTML-Form Client Side Video Uploads
      • Get Video Status
      • Get Videos
      • Get Video
      • Update Video
      • Delete Video
      • Download Original Video
      • Get Video for Mobile App/Custom Player
      • Update Video Image
      • Add Video Captions/Chapters/Subtitles
      • Delete Video Captions/Subtitles/Chapters
      • Create Expirable Links
      • Get Collected Emails
      • Setting Up Webhooks
      • Copy call-to-action (CTA) to Videos
      • Token Authentication
    • Projects
      • Create Project
      • Update a Project
      • Get Projects
      • Get a Project
      • Delete a Project
      • Set default CTA for Project
    • Live Streaming
      • Create a Live Stream
      • Update a Live Stream
      • Get Live Streams
      • Get a Live Stream
      • Count Live Streams
      • Live Streams Limit
      • Get Live Streaming Recording
      • Delete a Live Stream
      • Service and Regions for live streams
    • Channels
      • Get Channels
      • Get Channel
      • Delete Channel
    • Subscriptions
      • Create a Plan
      • Create a Member
      • Attach Plan To Member
      • Get Plans
      • Get Members
      • Get Member's Plans
      • Delete a Plan
    • Analytics
      • Use your User Ids in Analytics
      • Get Video Analytics
    • Javascript Events Methods
      • Plain Javascript Events & Methods
      • Control the Player using React
      • Control the Player in Vue.js
    • Developer Resources
      • How to embed DynTube player in Next.Js
      • How to embed the video player in React
      • How to play DynTube videos in React Native
      • ExoPlayer app to play HLS videos
      • How to embed videos & channels dynamically
      • How to Import Vimeo Videos into DynTube
Powered by GitBook
On this page
  • Prerequisites
  • Setting Up Webhooks
  • Configuring Published Events
  • Receiving Webhook Data
  • Sample Webhook Data
  1. Reference
  2. Videos

Setting Up Webhooks

PreviousGet Collected EmailsNextCopy call-to-action (CTA) to Videos

Last updated 1 year ago

DynTube allows you to set up webhooks to receive notifications for specific events such as videoPublished, streamStarted, and streamStopped. This documentation will guide you through the process of configuring webhooks for your DynTube account.

Prerequisites

Before you can set up webhooks on the DynTube dashboard, make sure you have the necessary access and permissions within your DynTube account.

Setting Up Webhooks

To configure webhooks for specific events, follow the steps below:

Configuring Published Events

  1. Log in to your DynTube account.

  2. Navigate to the Account Settings page: .

  3. Find the "Webhooks" section and click it

  4. Set the event type e.g "videoPublished."

  5. Provide the webhook URL where you want to receive notifications for videoPublished events.

  6. Webhook configuration will be automatically saved.

Receiving Webhook Data

When the specified events occur, DynTube will send POST requests to the webhook URLs you've configured. Your server should be prepared to handle these incoming requests and process the data accordingly.

Sample Webhook Data

Here are examples of the data you can expect to receive for each event:

Video Published Event

{
  "event": "videoPublished",
  "video": {
    "Id": "YOUR_VIDEO_ID",
    "Duration": "00:00:02.2200000",
    "ProjectId": "YOUR_PROJECT_ID",
    "AccountKey": "YOUR_ACCOUNT_KEY",
    "Region": "aus-s",
    "Image": {
      "xsUrl": "",
      "smUrl": "",
      "mdUrl": "",
      "lgUrl": ""
    },
    "Captions": [],
    "Key": "YOUR_VIDEO_KEY",
    "ChannelKey": "YOUR_CHANNEL_KEY",
    "PrivateLink": "YOUR_PRIVATE_LINK",
    "IframeLink": "YOUR_IFRAME_LINK",
    "HLSLink": "YOUR_HLS_LINK",
    "PlanType": 1,
    "Mp4Url": "",
    "Mp4Urls": [],
    "Formats": {
      "Hls": true,
      "Mp4": false,
      "Options": {
        "SecureMp4": true
      }
    },
    "HLSUrl": "YOUR_HLS_URL",
    "HLSUrlWeb": "YOUR_HLS_URL_WEB",
    "Title": "YOUR_VIDEO_TITLE",
    "Description": "YOUR_VIDEO_DESCRIPTION",
    "Options": {
      // Other options
    },
    "Tags": [
      // Tags
    ],
    "Version": 1,
    "Status": 3,
    "Created": "2023-11-02T09:41:42.3963223+00:00"
  }
}

Stream Started Event

{
  "streamKey": "YOUR_STREAM_KEY",
  "event": "streamStarted",
  "date": "2023-11-02T09:41:35.738Z"
}

Stream Stopped Event

{
  "streamKey": "YOUR_STREAM_KEY",
  "event": "streamStopped",
  "date": "2023-11-02T09:41:42.341Z"
}

You can use the received data to automate various processes and stay updated on important events within your DynTube account.

https://app.dyntube.com/#/account/settings