# Referral by player

`GET https://api.nexus.gg/v1/referrals/player/{playerId}`

Looks up a group member by their `playerId` and returns their referral codes, plus the paginated list of `referrals` attributed to that member's codes.

The `playerId` here identifies the group member by their `externalRef`: the identifier you supplied for that creator when you generated their code or linked their Nexus account. It is not the id of the player being referred; that value appears separately on each item in `referrals`.

Pass `excludeReferralList`=true to skip the referral history and get back only the member summary and codes. When set, `currentPage`, `currentPageSize`, `totalCount`, and `referrals` are left out of the response entirely.

## Authorizations

- `X-SHARED-SECRET` (string, header, required) - Send your **public** API key (`nexus_pk_...`) in the `X-SHARED-SECRET` header. [Generate one](/authentication/api-keys/) in the Publisher Dashboard.

## Path parameters

- `playerId` (string, required) - Your identifier for this group member (their `externalRef`), the same value you supplied when you generated their code or linked their Nexus account. Not the id of the player being referred.

## Query parameters

- `groupId` (string) - Creator group to use for this operation. If your key is scoped to a single program, that group is always used regardless of this value; otherwise falls back to your default group when omitted.
- `page` (integer) - `page` of records to return
- `pageSize` (integer) - Maximum number of records to return
- `excludeReferralList` (boolean) - If set to true, `referrals` are not retrieved and the response omits `currentPage`, `currentPageSize`, `totalCount`, and `referrals` entirely.

## Responses

### 200

Referral code info requested

#### Body (`application/json`)

- `groupId` (string) - ID of the creator group
- `groupName` (string) - Name of the creator group
- `referralCodes` (array of object)
- `playerId` (string) - Your identifier for this creator (their `externalRef`), the same value you supplied when you generated their code or linked their Nexus account. Not the id of the player being referred.
- `currentPage` (integer) - Page number of response records returned
- `currentPageSize` (integer) - Page size used for this operation
- `totalCount` (integer) - Total number of referrals for this code
- `referrals` (array of object)

### 400

Bad request

#### Body (`application/json`)

- `code` (string) - CodeNotInGroup: Creator group is private, and specified code is not linked to it<br /> InvalidGroup: No creator group was found with the specified groupId<br/> InvalidAuthCode: AuthCode provided is not valid<br/> ExpiredAuthCode: AuchCode provided has expired<br/> ReferralNexusNotFound: No Nexus was found to match the provided referral code Allowed values: InvalidGroup, CodeNotInGroup, InvalidAuthCode, ExpiredAuthCode, ReferralNexusNotFound, UnknownError.
- `message` (string)
