Quickstart

Create an app, sign a player in and read their friends. About ten minutes.

  1. Create an app. Open the developer console, sign in with your REAN account and choose New app. Pick Public for games, desktop, mobile and browser apps (no secret), or Confidentialfor a server you control.
  2. Add a redirect URI if players sign in through a browser (e.g. https://yourgame.com/auth/callback or http://127.0.0.1/callback for desktop apps). Games that use device codes or the REAN Launcher don't need one.
  3. Sign the player in with your SDK:
    UReanSubsystem* Rean = GetGameInstance()->GetSubsystem<UReanSubsystem>();
    
    FReanSignInDelegate OnDone;
    OnDone.BindDynamic(this, &AMyGameMode::OnReanSignedIn);
    FReanDeviceCodeDelegate OnCode;
    OnCode.BindDynamic(this, &AMyGameMode::ShowReanCode); // "Go to reanstudios.com/activate and enter BCDF-GHJK"
    Rean->SignInWithDevice(OnCode, OnDone);
  4. Use the Social API.
    foreach (var friend in await rean.GetFriendsAsync())
        Debug.Log($"{friend.displayName} is {friend.presence.status}");
    
    await rean.SetActivityAsync(new ReanActivity { details = "Ranked", state = "Round 1", partyId = lobbyId, partySize = 1, partyMax = 5, joinable = true });