Skip to content

messaging_game_plays Webhook Event Reference

Updated: Aug 26, 2022

This callback occurs after a person played a round of Instant Games. To receive this event, you must subscribe to this callback by selecting the messaging_game_plays field when setting up your webhook.

{
  "sender": {
    "id": "PSID"
  },
  "recipient": {
    "id": "PAGE_ID"
  },
  "timestamp": 1469111400000,
  "game_play": {
    "game_id": "GAME-APP-ID",
    "player_id": "PLAYER-ID",
    "locale": "PLAYER-LOCALE",
    "context_type": "CONTEXT-TYPE:SOLO",
    "context_id": "CONTEXT-ID", # If a Messenger Thread context
    "score": SCORE-NUM, # If a classic score based game
    "payload": "PAYLOAD" # If a rich game
  }
}

Fields

sender FieldDescription
id stringThe Page-scoped ID for the person who sent a message to your business
recipient FieldDescription
id stringThe ID for your Facebook Page
game_play FieldDescription
context_id stringThe ID for the social context type if the type is not SOLO. This ID is in the Instant Game namespace.
context_type stringThe social context of the game; GROUP, SOLO, THREAD
game_id stringThe Meta app ID for the game
locale stringThe locale for the player
payload JSON objectThe JSON encoded object, set using FBInstant.setSessionData(). Only available for Rich Games
player_id stringThe ID for the player in the Instant Game namespace.
score integerThe best score achieved by this playing during this round of game play. Only available to Classic score based games.

Unofficial mirror for reference/search purposes. All content originates from developers.facebook.com — see the source link at the top of each page. Machine-readable indexes: llms.txt · llms-full.txt · About