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

# Subscribing to resources for real-time messages

> Subscribe PlayFab Lobby and Matchmaking clients to resource topics over the real-time messages SignalR Hub using a connection handle from StartOrRecoverSession.

> [!NOTE]
>
> The REST and SignalR APIs documented here are more complex than the client SDKs. Consider using the [Lobby C++ SDK](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md) or [Matchmaking C++ SDK](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members.md) instead, unless those SDKs don't meet your needs.

After the client [connects to the SignalR
Hub](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/signalr-hub.md#connecting-to-the-signalr-hub), and calls
[StartOrRecoverSession](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/server-methods/start-or-recover-session.md) to receive a
`Connection Handle`, it's ready to subscribe to topics and receive messages.
When subscribing to Lobby or Matchmaking resources, the client will need to
provide the `Connection Handle` that they received when starting the session.
For more information about starting and managing a session, see the [SignalR
Hub](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/signalr-hub.md) overview.

To manage resource subscriptions with the services that publish messages,
see:

| Service | Subscription API | Unsubscription API |
| - | - | - |
| Lobby service | [SubscribeToLobbyResource](https://learn.microsoft.com/en-us/rest/api/playfab/multiplayer/lobby/subscribe-to-lobby-resource) | [UnsubscribeFromLobbyResource](https://learn.microsoft.com/en-us/rest/api/playfab/multiplayer/lobby/unsubscribe-from-lobby-resource) |
| Matchmaking service | [SubscribeToMatchmakingResource](https://learn.microsoft.com/en-us/rest/api/playfab/multiplayer/matchmaking/subscribe-to-matchmaking-resource) | [UnsubscribeFromMatchmakingResource](https://learn.microsoft.com/en-us/rest/api/playfab/multiplayer/matchmaking/unsubscribe-from-matchmaking-resource) |

## See also

* [Real-time messages SignalR Hub](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/signalr-hub.md)
* [Real-time messages for Lobby and Matchmaking APIs](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/overview.md)


## Related topics

- [Real-time messages SignalR Hub](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/signalr-hub.md)
- [Real-time messages for Lobby and Matchmaking APIs](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/overview.md)
- [SubscriptionChangeMessage real-time messages type](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/types/subscription-change-message.md)
- [Message real-time messages type](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/types/message.md)
- [StartOrRecoverSessionResponse real-time messages type](https://docs.xbox.com/services/playfab/multiplayer/real-time-messages/types/start-or-recover-session-response.md)
