> For the complete documentation index, see [llms.txt](https://horizongames.gitbook.io/kronos-matchmaking/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://horizongames.gitbook.io/kronos-matchmaking/usage/party/joining-parties.md).

# Joining Parties

In order to access online features, the player must be logged in with the **Online Subsystem**. Please visit the [**Authentication**](/kronos-matchmaking/usage/authentication/authenticating-users.md) page for more information.

## Joining From Party Invite

Players who accept a party invite will join the party automatically.

## Joining Parties Directly

You can directly join a party by using the `JoinKronosParty` node. Note that you only have to do this if you are not joining parties through party invites.

There is no hard requirement on where you need to call this from. Most games will probably have this hooked to the `OnClicked` event of a widget button.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="/files/cTD7fT9fkvKy9in2D8YG" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
#include "KronosMatchmakingManager.h"
#include "KronosMatchmakingPolicy.h"
```

```cpp
// The session you want to join. You must get this somehow, for example by doing a SearchOnly matchmaking.
// Please note that search results cannot be replicated or sent via RPCs! This is an Online Subsystem limitation.
// Notice that this is passed into the lambda so that we can access it.
FKronosSearchResult SessionToJoin;

// Get the matchmaking manager.
UKronosMatchmakingManager* MatchmakingManager = UKronosMatchmakingManager::Get(this);

// Request a new matchmaking policy. This operation is async!
// If matchmaking is in-progress, it will be canceled first.
MatchmakingManager->CreateMatchmakingPolicy(FOnCreateMatchmakingPolicyComplete::CreateLambda([this, SessionToJoin](UKronosMatchmakingPolicy* MatchmakingPolicy)
{
    // Matchmaking params are irrelevant in JoinOnly mode.
    FKronosMatchmakingParams MatchmakingParams = FKronosMatchmakingParams();

    // Matchmaking flags to use.
    uint8 MatchmakingFlags = static_cast<uint8>(EKronosMatchmakingFlags::None);

    // Tell the matchmaking that we only want to join a session that we've got already.
    EKronosMatchmakingMode MatchmakingMode = EKronosMatchmakingMode::JoinOnly;

    // Start matchmaking.
    // Notice that we are using NAME_PartySession!
    MatchmakingPolicy->StartMatchmaking(NAME_PartySession, MatchmakingParams, MatchmakingFlags, MatchmakingMode, 0.0f, SessionToJoin);
}));
```

{% endtab %}
{% endtabs %}

## Finding Parties To Join

The matchmaking system of Kronos can also be used to find and join parties if needed. This approach works exactly the same way as with matches because internally there is not much difference between matches and parties. They are both just sessions on the backend. The equivalent nodes are:

* `StartKronosPartyMatchmaking`: Start matchmaking for public party sessions and join the best result automatically.
* `FindKronosParties`: Find public party sessions and let the user decide which one to join.

For more information please refer to the relevant sections in the [**Matchmaking**](/kronos-matchmaking/usage/matchmaking.md) documentation page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://horizongames.gitbook.io/kronos-matchmaking/usage/party/joining-parties.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
