Skip to content

Looks up the referral code on file for a player. If the player has no referral on file, the response is 404 with code set to PlayerHasNoReferral.

X-SHARED-SECRET
required
stringheader

Send your public API key (nexus_pk_...) in the X-SHARED-SECRET header. Generate one in the Publisher Dashboard.

playerId
required
string
Example
player_8f2c41d0

Unique identifier of the player to look up the current referral code for.

groupId
string
Example
V1StGXR8_Z5jdHi6B1LiO

Creator group to use for this operation. If your key is scoped to a single program, that group is always used instead of this value; otherwise the lookup falls back to your default group when this is omitted.

Current referral code for the given player

Media typeapplication/json
string

Specified player has not used a referral code

Media typeapplication/json
object
code
string
GET
/player/{playerId}/code
curl --request GET \
--url 'https://api.nexus.gg/v1/referrals/player/player_8f2c41d0/code?groupId=V1StGXR8_Z5jdHi6B1LiO' \
--header 'X-SHARED-SECRET: nexus_pk_your_key_here'
Example
popcornfrog