Media Manager allows you to setup webhooks for events that occur within the Media Manager App. You can create webhooks from the account page under the webhooks tab on the left hand side.

There are a number of different events that webhooks can be connected to.

  • Video Created
  • Video Updated
  • Video Deleted
  • Video Failed
  • User Login
  • Audio Created
  • Audio Updated
  • Audio Deleted

When a webhook is triggered, Media Manager simply sends  a POST request to the webhook URL with a payload. The payload data itself is passed in the payload field.

Accessing the payload

So when we receive data from Media Manager via our new webhook it sends along a payload.

//The payload
$payload = $_POST['payload'];
//Access video title from payload
$title = $payload['title'];
Media Manager always sends requests as POST to webhook endpoints and the payload data can be different depending on the type of webhook event. For instance if you create a webhook for whenever a user logs in, then the user data is passed as the payload instead of video data.