This how-to walks you through configuring Sign in with Apple and starting an Apple session from your game.
Prerequisites
- Unity, Unreal, or Godot SDK installed and configured in your project (not required for REST).
- An Apple developer account with access to the Apple Developer Portal.
Configuration
Configure your integration in the platform settings.

Team ID: log in to the Apple Developer Portal and go to the Membership page to find your Team ID.
Client ID: in most cases this is the bundle identifier for your app, set when you created it in Xcode or the Apple Developer Portal.
Key ID & Certificate: in the Apple Developer Portal, go to Certificates, Identifiers & Profiles and create a new key. Enable "Sign in with Apple" on the key and set the Primary App ID to your game's bundle identifier. Download the certificate when finished — you'll upload it to the LootLocker Console. The Key ID is visible when you click the key after creation.
Start Session
Acquire an Apple authorization code, then use it to start a session. The response includes a refresh token, which LootLocker stores so you don't need to repeat the full sign-in flow each time.
// authCode can be retrieved from appleIDCredential.authorizationCodestring authCode = "put authorizationCode here";LootLockerSDKManager.StartAppleSession(authCode, (response) =>{ if (!response.success) { Debug.Log("error starting LootLocker session");
return; }
Debug.Log("session started successfully");});
Input
Exchange the TriggerAppleStartSession event for whatever event should trigger the login flow. Remove the REPLACE: Apple Auth Code node and replace it with your preferred method of getting the Apple Authentication Code.
Output
Branch the completed events on the success flag, and add error handling for the failure case. Create variables from the Player ID and Player Identifier outputs for subsequent LootLocker calls. The session response also includes a refresh token (saved automatically, but available if you want to manage it manually), along with other fields such as current XP and level.
Coming soon — this sample hasn't been written yet.
curl -X POST "https://api.lootlocker.io/game/session/apple" \ -H "LL-Version: 2021-03-01" \ -H "Content-Type: application/json" \ -d "{\"game_key\": \"your_game_key\", \"apple_authorization_code\": \"eyJQa....\", \"game_version\": \"1.0.0.0\", \"session_id\": \"8438f4b3-90e4-4cdd-8434-c5c6b4c2c9f1\"}"Example response:
{ "success": true, "session_token": "e6fa44946f077dd9fe67311ab3f188c596df9969", "player_id": 3, "public_uid": "TSEYDXD8", "player_created_at": "2022-05-30T07:56:01+00:00", "check_grant_notifications": true, "check_deactivation_notifications": false, "seen_before": true, "refresh_token": "748b5ac8-794a-44e3-bb59-c59a2f397e84", "player_identifier": "76561198023004363"}Refresh Session
Refresh the session instead of having the player go through the full sign-in flow every time. The request returns a 401 (Unauthorized) if the refresh token has expired, in which case start a new session instead.
LootLockerSDKManager.RefreshAppleSession((response) =>{ if (!response.success) { if (response.statusCode == 401) { // Refresh token has expired, use StartAppleSession } else { Debug.Log("error starting LootLocker session"); }
return; }
Debug.Log("session started successfully");});
Input
Exchange the TriggerAppleRefreshSession event for whatever event should trigger the login flow. The Refresh Token node is the one you saved when starting a session, but it's optional since LootLocker saves it automatically.
Output
Branch the completed events on the success flag, and add error handling for the failure case. Create variables from the Player ID and Player Identifier outputs for subsequent LootLocker calls.
Coming soon — this sample hasn't been written yet.
curl -X POST "https://api.lootlocker.io/game/session/apple" \ -H "LL-Version: 2021-03-01" \ -H "Content-Type: application/json" \ -d "{\"game_key\": \"your_game_key\", \"refresh_token\": \"748b....\", \"player_identifier\": \"765..\", \"game_version\": \"1.0.0.0\", \"session_id\": \"8438f4b3-90e4-4cdd-8434-c5c6b4c2c9f1\"}"Example response:
{ "success": true, "session_token": "e6fa44946f077dd9fe67311ab3f188c596df9969", "player_id": 3, "public_uid": "TSEYDXD8", "player_created_at": "2022-05-30T07:56:01+00:00", "check_grant_notifications": true, "check_deactivation_notifications": false, "seen_before": true, "refresh_token": "748b5ac8-794a-44e3-bb59-c59a2f397e84", "player_identifier": "76561198023004363"}Conclusion
You've started using LootLocker in your game with Sign in with Apple. Next, review LootLocker's full feature set to decide which other features to implement.