Player events
Webhooks
Configuring Webhooks for Game Event Notifications
Webhooks allow you to receive real-time notifications of game events from playgen.io directly to your server. By configuring a webhook, you can automate responses to in-game events, such as tracking analytics, updating leaderboards, or triggering custom actions based on player behavior.
Configuring Webhooks
To set up a webhook for your playgen.io game events:
-
Open Webhook Configuration:
- Navigate to the game settings in your dashboard and locate the Webhook Configuration section.
-
Enter Webhook URL:
- Input the URL of your server endpoint where you want to receive the game events.
- The URL must start with
https://
.
-
API Key (Optional):
- If your server requires authentication, you can enter an API key, which will be included as a bearer token in the
Authorization
header of each webhook request. - This helps secure your webhook endpoint by ensuring that only requests with the correct API key are accepted.
- If your server requires authentication, you can enter an API key, which will be included as a bearer token in the
-
Apply the Configuration:
- Click Apply to save your webhook settings. Once configured, playgen.io will send a POST request to your webhook URL every time a specified game event occurs.
Sample Webhook Payload
Each webhook payload will contain the event type and relevant data. Below is an example of what a webhook payload might look like: