Skip to main content

Join a Session

Last updated on

Call the JoinSession() function to join a known session. This method requires a session ID and password (if the session has a password). This function will return network data such as IP and Port that can be used to connect to a game host.

FString SessionId { "KnownSessionId" };
FString SessionPassword {"InputPassword"};

ApiClient->SessionBrowser.JoinSession(SessionId, SessionPassword,
THandler<FAccelByteModelsSessionBrowserData>::CreateLambda([](const FAccelByteModelsSessionBrowserData& Result)
{
// Do something when request success
}), FErrorHandler::CreateLambda([](const int32 Code, const FString& Msg)
{
// Do something when request error
}));