Console
Friends

Game Invite

Send or respond to a game invite. Invites only work between confirmed friends and expire automatically after 5 minutes.

POST /api/vaneltonid/game_invite.php
Requires Authorization: AppID:AppKey + user token

Send an invite (action: "send")

FieldTypeRequiredDescription
tokenstringrequiredSender's session token
actionstringrequiredsend
friend_idintrequiredID of the friend to invite
appidstringrequiredPackage ID of the game
room_dataobjectoptionalArbitrary JSON with join info (room ID, server address, etc.)

Send response 200

{ "success": true, "invite_id": 102 }

Respond to an invite (action: "respond")

The recipient responds using the notification_id from the game_invite notification.

FieldTypeRequiredDescription
tokenstringrequiredRecipient's session token
actionstringrequiredrespond
notification_idintrequiredID of the game_invite notification
acceptedboolrequiredtrue to accept, false to decline

Respond response 200

{ "success": true, "accepted": true }

After responding, the sender automatically receives a game_invite_accepted or game_invite_declined notification on their next poll.

Errors

CodeMessageCause
403You can only invite friends.Target is not a confirmed friend
404Notification not found or expired.Invite expired (5 min) or invalid notification ID