Skip to content

Conversation

Copy link

Copilot AI commented Nov 18, 2025

Implements the Connected Accounts List endpoint for the Server API, mirroring changes from go-backend PR #521 per https://github.com/lootlocker/index/issues/1030.

Changes

New endpoint: POST /server/connected-accounts/v1/list

Files added:

  • LootLockerServerConnectedAccountsRequest.h/cpp - Request handler and data structures

Files modified:

  • LootLockerServerEndpoints.h/cpp - Endpoint registration
  • LootLockerServerForCpp.h/cpp - C++ API surface
  • LootLockerServerForBlueprints.h/cpp - Blueprint API surface

API

// C++ usage - List connected accounts for multiple players (up to 25)
ULootLockerServerForCpp::ListConnectedAccounts(
    PlayerULIDs,      // TArray<FString>
    LegacyPlayerIDs,  // TArray<int>
    OnCompletedRequest
);

// Request
struct FLootLockerServerListConnectedAccountsRequest {
    TArray<FString> Player_ids;         // Player ULIDs
    TArray<int> Legacy_player_ids;      // Legacy integer Player IDs
};

// Response
struct FLootLockerServerConnectedAccount {
    FString Provider;           // "steam", "xbox", "psn", etc.
    FString Provider_name;      // Human readable provider name
    FString Player_identifier;  // Player ID on provider
};

struct FLootLockerServerPlayerPlatform {
    int Legacy_player_id;       // Integer Player ID
    FString Player_id;          // Player ULID
    TArray<FLootLockerServerConnectedAccount> Connected_accounts;
};

struct FLootLockerServerListConnectedAccountsResponse {
    TArray<FLootLockerServerPlayerPlatform> Player_platforms;
};

Follows established SDK patterns and matches the OpenAPI specification for batch requests supporting up to 25 players per request.

  • Fixes lootlocker/sdk-issues#373
Original prompt

This section details on the original issue you should resolve

<issue_title>Add Connected Account Listing to Server API</issue_title>
<issue_description>Mirroring changes made here: https://github.com/lootlocker/index/issues/1030</issue_description>

<agent_instructions>The changes made in https://github.com/lootlocker/go-backend/pull/521 resulted in the api definition found here: https://ref.lootlocker.com/server/connected-accounts/list and is what should be implemented in the LootLocker Unreal Server SDK. Implementation should follow the SDK's architectural pattern and best practices. The definitions and methods should be placed alongside related functionality if it exists.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@kirre-bylund Completed in this PR: https://github.com/lootlocker/go-backend/pull/521
  • Fixes lootlocker/sdk-issues#373

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 18, 2025 15:31
Co-authored-by: kirre-bylund <4068377+kirre-bylund@users.noreply.github.com>
Co-authored-by: kirre-bylund <4068377+kirre-bylund@users.noreply.github.com>
Copilot AI changed the title [WIP] Add connected account listing to server API Add Connected Accounts List endpoint to Server API Nov 18, 2025
Copilot finished work on behalf of kirre-bylund November 18, 2025 15:38
Copilot AI requested a review from kirre-bylund November 18, 2025 15:38
Copy link
Contributor

@kirre-bylund kirre-bylund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could not access the apidog spec so I don't fault you for hallucinating. But here's the spec, please implement the actual spec:

openapi: 3.0.1
info:
  title: ''
  version: 1.0.0
paths:
  /server/connected-accounts/v1/list:
    post:
      summary: List Providers For Players
      deprecated: false
      description: |-
        Request connected platforms of up to 25 players at once.

        If you request too many players, you will be met with an error.
      tags:
        - Connected Accounts
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                player_ids:
                  type: array
                  items:
                    type: string
                  description: List of Player ULIDs
                legacy_player_ids:
                  type: array
                  items:
                    type: integer
                  description: List of legacy integer Player IDs
              x-apidog-orders:
                - player_ids
                - legacy_player_ids
            example:
              player_ids:
                - 01K8TD77145MBN1SCWKF6WN046
              legacy_player_ids:
                - 2
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  player_platforms:
                    type: array
                    items:
                      type: object
                      properties:
                        legacy_player_id:
                          type: integer
                          description: Integer based Player ID
                        player_id:
                          type: string
                          description: ULID for the player
                        connected_accounts:
                          type: array
                          items:
                            type: object
                            properties:
                              provider:
                                type: string
                                description: Simple provider name
                              provider_name:
                                type: string
                                description: Human readable provider name
                              player_identifier:
                                type: string
                                description: The identifier of the player on said provider
                            required:
                              - provider
                              - provider_name
                              - player_identifier
                            x-apidog-orders:
                              - provider
                              - provider_name
                              - player_identifier
                          description: List of connected authentication providers
                      x-apidog-orders:
                        - legacy_player_id
                        - player_id
                        - connected_accounts
                      required:
                        - legacy_player_id
                        - player_id
                        - connected_accounts
                required:
                  - player_platforms
                x-apidog-orders:
                  - player_platforms
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  trace_id:
                    type: string
                required:
                  - message
                  - trace_id
          headers: {}
          x-apidog-name: Bad Request
      security: []
      x-apidog-folder: Connected Accounts
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/446498/apis/api-23934064-run

@@ -0,0 +1 @@
. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in d6c0d73 - removed the _codeql_detected_source_root symlink.

FLootLockerServerEndPoint ULootLockerServerEndpoints::LookupMultiplePlayerNamesUsingIDs = InitEndpoint("players/lookup/name", ELootLockerServerHTTPMethod::GET);

// Connected Accounts
FLootLockerServerEndPoint ULootLockerServerEndpoints::ListConnectedAccounts = InitEndpoint("players/{0}/connected-accounts", ELootLockerServerHTTPMethod::GET);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL is wrong

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in d6c0d73 - corrected endpoint to connected-accounts/v1/list with POST method.

@kirre-bylund
Copy link
Contributor

@copilot ready for you to adress review

…, fix endpoint URL and implement proper request/response structures

Co-authored-by: kirre-bylund <4068377+kirre-bylund@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 20, 2025

You could not access the apidog spec so I don't fault you for hallucinating. But here's the spec, please implement the actual spec:

openapi: 3.0.1...

Implemented the actual API spec in d6c0d73. The endpoint now correctly uses POST /server/connected-accounts/v1/list and accepts arrays of player_ids and legacy_player_ids (up to 25 players), returning player_platforms with connected_accounts matching the OpenAPI specification.

Copilot AI requested a review from kirre-bylund November 20, 2025 11:39
Copilot finished work on behalf of kirre-bylund November 20, 2025 11:39
Copy link
Contributor

@kirre-bylund kirre-bylund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

@kirre-bylund kirre-bylund marked this pull request as ready for review November 20, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants