Look up the members of your creator group and their codes. Every route here uses your public API key, so it is safe to call from a game client.
All members
Section titled “All members”Return every member of your group with their details, including unique id and code. This is a
public-key route, so it is safe to call from a game client.
/manage/memberscurl -X GET https://api.nexus.gg/v1/manage/members \ -H "accept: application/json" \ -H "X-SHARED-SECRET: nexus_pk_your_key_here"const res = await fetch('https://api.nexus.gg/v1/manage/members', { headers: { 'X-SHARED-SECRET': process.env.NEXUS_PUBLIC_KEY },});const { members } = await res.json();import requests
res = requests.get( "https://api.nexus.gg/v1/manage/members", headers={"X-SHARED-SECRET": NEXUS_PUBLIC_KEY},)members = res.json()["members"]The status should be 200 OK with a JSON response body that looks something like this:
{ "groupId": "CsRKC8uD0NLtyQ0LOt8Ru", "groupName": "Test Group", "codeTTLInDays": 90, // only included if set in the Nexus Dashboard "currentPage": 1, "currentPageSize": 100, "totalCount": 15, "members": [ { "id": "9jd7RBR_B2BZ0uWO3_lgv", "name": "PopcornFrog", "logoImage": "https://cdn.nexus.gg/9jd7RBR_B2BZ0uWO3_lgv/images/logo-image.jpg", "profileImage": "https://cdn.nexus.gg/9jd7RBR_B2BZ0uWO3_lgv/images/profile-image.jpg", "codes": [{ "code": "popcornfrog", "isPrimary": true, "isGenerated": false, "isManaged": false }] }, { "id": "CsRKC8uD0NLtyQ0LOt8Ru", "name": "samzorz", "logoImage": "https://cdn.nexus.gg/CsRKC8uD0NLtyQ0LOt8Ru/images/logo-image.jpg", "profileImage": "https://cdn.nexus.gg/CsRKC8uD0NLtyQ0LOt8Ru/images/profile-image.jpg", "codes": [{ "code": "samzorz", "isPrimary": true, "isGenerated": false, "isManaged": false }] }, { "id": "zeHr0cmIuvB8zVSSOAb7u", "name": "generatedMember", "logoImage": "https://cdn.nexus.gg/zeHr0cmIuvB8zVSSOAb7u/images/logo-image.jpg", "profileImage": "https://cdn.nexus.gg/zeHr0cmIuvB8zVSSOAb7u/images/profile-image.jpg", "codes": [{ "code": "sj04ka", "isPrimary": true, "isGenerated": true, "isManaged": true }] }, { "id": "QqC42pqB4TJfcX6KOw7wv", "name": "claimedMember", "playerId": "userUniqueIdentifier1", "logoImage": "https://cdn.nexus.gg/QqC42pqB4TJfcX6KOw7wv/images/logo-image.jpg", "profileImage": "https://cdn.nexus.gg/QqC42pqB4TJfcX6KOw7wv/images/profile-image.jpg", "codes": [ { "code": "mynexus", "isPrimary": true, "isGenerated": false, "isManaged": false }, { "code": "dl8apj1", "isPrimary": false, "isGenerated": true, "isManaged": false } ] } ]}Codes you generated that have not yet been claimed by a Nexus account are flagged isManaged.
Specific members
Section titled “Specific members”By your unique identifier (playerId)
Section titled “By your unique identifier (playerId)”Retrieve the referral code and history for a member associated with a specific playerId.
/manage/members/player/{playerId}curl -X GET https://api.nexus.gg/v1/manage/members/player/userUniqueIdentifier1 \ -H "accept: application/json" \ -H "X-SHARED-SECRET: nexus_pk_your_key_here"The status should be 200 OK with a JSON response body that looks something like this:
{ "groupId": "CsRKC8uD0NLtyQ0LOt8Ru", "groupName": "Test Group", "codeTTLInDays": 90, // only included if set in the Nexus Dashboard "id": "QqC42pqB4TJfcX6KOw7wv", "name": "claimedMember", "playerId": "userUniqueIdentifier1", "logoImage": "https://cdn.nexus.gg/QqC42pqB4TJfcX6KOw7wv/images/logo-image.jpg", "profileImage": "https://cdn.nexus.gg/QqC42pqB4TJfcX6KOw7wv/images/profile-image.jpg", "codes": [ { "code": "mynexus", "isPrimary": true, "isGenerated": false, "isManaged": false }, { "code": "dl8apj1", "isPrimary": false, "isGenerated": true, "isManaged": false } ]}By code or member ID
Section titled “By code or member ID”You can also retrieve a member by their code or memberId.
/manage/members/{memberCode}/manage/members/id/{memberId}curl -X GET https://api.nexus.gg/v1/manage/members/mynexus \ -H "accept: application/json" \ -H "X-SHARED-SECRET: nexus_pk_your_key_here"curl -X GET https://api.nexus.gg/v1/manage/members/id/QqC42pqB4TJfcX6KOw7wv \ -H "accept: application/json" \ -H "X-SHARED-SECRET: nexus_pk_your_key_here"The status should be 200 OK with a JSON response body in the same member shape as the playerId lookup:
{ "groupId": "CsRKC8uD0NLtyQ0LOt8Ru", "groupName": "Test Group", "codeTTLInDays": 90, // only included if set in the Nexus Dashboard "id": "QqC42pqB4TJfcX6KOw7wv", "name": "claimedMember", "playerId": "userUniqueIdentifier1", "logoImage": "https://cdn.nexus.gg/QqC42pqB4TJfcX6KOw7wv/images/logo-image.jpg", "profileImage": "https://cdn.nexus.gg/QqC42pqB4TJfcX6KOw7wv/images/profile-image.jpg", "codes": [ { "code": "mynexus", "isPrimary": true, "isGenerated": false, "isManaged": false }, { "code": "dl8apj1", "isPrimary": false, "isGenerated": true, "isManaged": false } ]}Code time to live (TTL)
Section titled “Code time to live (TTL)”We recommend persisting an entered code indefinitely (see our UI & UX best practices). However, each
member-retrieval route passes through a codeTTLInDays property to help you implement a time-to-live
system. Set it in your Nexus Dashboard
under your program’s Configuration settings. It is passed through on every member-retrieval response,
so you can change or remove the TTL without shipping a new build of your application.
Code TTL implementation example
Section titled “Code TTL implementation example”When a user enters a code, persist it with a timestamp. On render, look the member up by code via the
By Code or Member ID route. If the response includes a codeTTLInDays, compare
it to the days since you saved the code. If the gap exceeds codeTTLInDays, clear the saved code and
require re-entry. Always account for there being no codeTTLInDays on the response, so you can remove
the TTL at any time.