Where can I get/find SessionId to join game session

In Session.JoinGameSession(), it requires SessionId.
Where can I get it?

I’m trying to follow the page “Configuring Session Templates with the SDK”

Hello Chong.

When you create a Session with this function:

ApiClient->Session.CreateGameSession(Request,
     THandler<FAccelByteModelsV2GameSession>::CreateLambda(
        [&](const FAccelByteModelsV2GameSession& Result)
         {
             // Store SessionID
         }),
     FErrorHandler::CreateLambda(
        [&](int32 ErrorCode, const FString& ErrorMessage)
         {
             // Do something when operation error / failed
         }));

You can store the session ID as you can see in the comment.

Are you able to do that step and get a valid session created?

Hi Ivan,
In that case, Is Result.ID the SessionID?

Yes it should be @chong_chamogames

If it’s not the case, please let us know.

1 Like