> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblMultiplayerManagerFindMatch

> XblMultiplayerManagerFindMatch

# XblMultiplayerManagerFindMatch

Submits a matchmaking request to the server.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerManagerFindMatch(  
         const char* hopperName,  
         const char* attributesJson,  
         uint32_t timeoutInSeconds  
)  
```

### Parameters

*hopperName*   \_In\_z\_\
Type: char\*

The name of the hopper for this request.

*attributesJson*   \_In\_opt\_z\_\
Type: char\*

Optional. The attributes of the match ticket for this request, as a JSON string.

*timeoutInSeconds*   \_In\_\
Type: uint32\_t

The maximum time, in seconds, to wait for users to join the match.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

This function submits a matchmaking request for the lobby session to Multiplayer Manager (MPM). Before you can use this function, you must first configure hoppers in the service configuration for your title. A hopper defines the rules that SmartMatch uses to match players. For more information about hoppers, see [Matchmaking overview](/services/xbox-services/multiplayer/matchmaking/live-matchmaking-overview). If a lobby session doesn't exist, likely because [XblMultiplayerManagerInitialize](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerinitialize) wasn't called, or if local users weren't added to the lobby session before calling this function, an error occurs. An error also occurs if matchmaking is already in progress. <br />The result of this function is delivered as a multiplayer event with an event type set to `XblMultiplayerEventType::FindMatchCompleted`. You can call [XblMultiplayerManagerDoWork](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerdowork) to retrieve multiplayer events.

## Requirements

**Header:** multiplayer\_manager\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[multiplayer\_manager\_c](/reference/live/xsapi-c/multiplayer_manager_c/multiplayer_manager_c_members)\
[XblMultiplayerManagerEstimatedMatchWaitTime](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerestimatedmatchwaittime)


## Related topics

- [XblMultiplayerManagerCancelMatch](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagercancelmatch.md)
- [XblMultiplayerManagerEstimatedMatchWaitTime](/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerestimatedmatchwaittime.md)
- [Multiplayer matchmaking with SmartMatch and MPM](/services/xbox-services/multiplayer/mpm/how-to/live-play-multiplayer-with-matchmaking.md)
- [Multiplayer Manager API overview](/services/xbox-services/multiplayer/mpm/concepts/live-multiplayer-manager-api-overview.md)
- [XblMultiplayerEventType](/reference/live/xsapi-c/multiplayer_manager_c/enums/xblmultiplayereventtype.md)
