Skip to main content

Player Update Webhook

The player.update webhook is triggered when a player's profile is updated on the Game Hub. This event is useful for updating player information in your game, such as the player's nickname, email, or avatar.

Requirements

To use player update webhooks from Aghanim, you should have the webhook server configured as follows:

  • HTTPS endpoint, accepting POST webhook requests.
  • Listen for events, generated and signed by Aghanim.
  • Trigger the display of mobile pushes using the received content.
  • Respond with 2xx status codes upon successful receipt and processing of the webhook, and 4xx or 5xx for denial or errors.

Configuration

  1. Develop a function for the player.update webhook processing.
  2. Make your endpoint available.
  3. Register your endpoint within Aghanim account → Game → Webhooks → New Webhook by choosing the player update event type.

Guide on configuring a campaign for a mobile push

Alternatively, you can register your endpoint within Aghanim using the Create Webhook API method.

The Event Data schema

KeyTypeDescriptionRequired?
player_idstringUnique Player ID chosen for player authentication.Yes
namestringPlayer's nickname.No
emailstringPlayer's email address.No
avatar_urlstringPlayer's avatar URL.No

Example Webhook Response:

{
"status": "ok"
}

Example of failure response:

Return with 200 status code and the following JSON response:

{
"status": "error",
"code": "not_found",
"message": "Player not found"
}

List of possible error codes:

  • not_found: The player not found.
  • invalid_signature: The signature was invalid.
  • validation_error: The request data was invalid.

Need help?
Contact our integration team at integration@aghanim.com