
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.
<?phpMedia Manager always sends requests as
//The payload
$payload = $_POST['payload'];
//Access video title from payload
$title = $payload['title'];
?>
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.