This function will search for a multi-player session using the Session Template, matchmaking hopper and Secure Device Association template, which you should have created beforehand in the XDP dashboard. The user ID you can retrieve for a particular game pad by calling the xboxlive_user_for_pad() function. The function will return a unique Request ID value, which can then be used to identify the correct Social Asynchronous Event for this function. This event will be triggered when the session has been created and will contain a DS Map in the variable async_load with the following key/value pairs:
- "requestid" â€“ contains the request ID as returned by the calling function
- "status" â€“ contains the string "session_created" to inform you of what type of event has been triggered.
- "num_results" â€“ contains 1 or more if a session has been found, otherwise contains 0.
- "sessionid<index>" â€“ contains the session ID, or -1 in case of failureÂ Â (<index/gt; is a value from 0 to "num_results" - 1).
- "sessionOwner<index>" â€“ contains the ID of the session host if a session has been foundÂ Â (<index> is a value from 0 to "num_results" - 1).
- "error" â€“ contains 0 on success, or -1 in case of failure
xboxlive_matchmaking_find(user_id, template, hopper, sdatemplate, [matchattributes]);
Argument Description user_id The user ID pointer to use template The name of the session template hopper The name of the matchmaking hopper sdatemplate The name of the secure device association template matchattributes [OPTIONAL]
Request ID (integer)
var userID =
result = xboxone_matchmaking_find(userID, "MatchTicketSession", "MatchTicketHopper", "PeerServerTraffic");
The above will retrieve the user ID for the user on the given gamepad and then try to find a matchmaking session for them.