Quickstart
Create an app, sign a player in and read their friends. About ten minutes.
- 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.
- Add a redirect URI if players sign in through a browser (e.g.
https://yourgame.com/auth/callbackorhttp://127.0.0.1/callbackfor desktop apps). Games that use device codes or the REAN Launcher don't need one. - 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); - 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 });