Subscribing to Webhooks
Last updated
Last updated
Webhooks allow your app to receive near-real-time updates about events happening in Gameball. By setting up a webhook, you can stay informed and take immediate action when specific events occur.
Your webhook endpoint must be an HTTP address capable of processing event notifications. Ensure you implement verification to confirm that requests are coming from Gameball.
To subscribe to webhooks through the Gameball Dashboard, follow these steps:
Navigate to the Settings:
Go to Admin Settings > Account Integration.
Edit the Webhooks Section:
In the Webhooks section, click Edit.
Enter the Endpoint URL:
Provide the URL where you want to receive event notifications.
Select the Webhook Version:
Choose V4 from the version dropdown.
After registering your webhook URL, Gameball will send an HTTP POST request with JSON data to your specified endpoint whenever the event occurs.
To ensure the webhook request is from Gameball, verify the X-GB-Signature
header. This signature is a Base64-encoded SHA1 hash of the payload and your SecretKey. By comparing the computed hash with the signature header, you can confirm the request's authenticity.
Example Verification Code
Here’s how to verify a webhook signature using Node.js: