metapro
  • 🤝Welcome!
  • 💻metapro market
    • Set your account
    • Connect wallet + web3 login
    • Side panel
      • Transfer NFT
        • Multiple transfer (Airdrop NFT)
          • Import CSV List
      • Sell NFT
        • Initial NFT Selling (INS)
          • How to setup INS auction
          • How to buy on INS auction
        • Buy Now
          • How to setup Buy Now auction
          • How to buy on Buy Now auction
        • Auction (Bidding)
          • How to setup Auction
          • How to buy on Auction
      • All NFT assets
    • Buy Crypto
    • Top Menu
      • Profile
        • Profile Marketplace
        • My games
        • My assets
          • Royalty
        • Activities
      • Referral Panel
        • Register your downline
        • Downline wallets
        • My referral link
      • Profile Settings
      • Developer Portal
      • Logout
    • Assets
      • Marketplace
        • Auction Card
      • Most favorite
      • Newest assets
        • Asset Card
    • Games
      • Show all games
    • Leaderboard
    • Create asset (minter)
      • Gaming asset specification
      • How to create (mint) asset
        • 1. Setup NFT token
        • 2. Setup metadata
        • 3. Add meta asset
        • 4. Mint meta asset
        • 5. Meta asset created
    • Developers Portal
      • Create team
      • Create game
      • Developers Portal Panel
      • Unity Plugin
      • How to list game on metapro market?
    • Creators
    • Teams
    • Users
    • Wallet App
    • Launcher
    • Market and auction component fees
  • 🚀METAPRO LAUNCHER
    • What is metapro launcher?
    • Download launcher
    • Set your account
      • Login to launcher
    • Home
    • Games
      • Game card on launcher
        • Assets in this game
      • Install game on launcher
      • Update game on launcher
    • My games
      • Installed
      • Not installed
      • Wishlist
    • My assets
      • Collected assets
      • Created assets
      • Wishlist
    • NODEs app
  • 📱metapro one
    • About non-custodial wallet
    • Download & set up
      • Create new metapro wallet
      • Import existing wallet
    • Settings
      • Avatar
      • Multiple wallets
      • Wallet name
      • Private Key
        • Protect Private Key
        • How to find my Private Key
      • Recovery Phrases
        • Protect Recovery Phrases
        • How to find my Recovery Phrases
      • Application version
    • Network switch
    • Deposit (Tokens and Collectibles)
    • Send (Tokens and Collectibles)
      • Send Tokens
      • Send Collectibles (NFT)
    • Buy (Buy and Sell Crypto)
    • Browser
    • My assets
      • Tokens
        • Asset view
        • Adding Tokens
        • Activities
      • Collectibles (NFT)
      • Game assets (NFTma)
    • Explore
      • Apps
      • Collections (NFT)
      • Game assets (NFTma)
    • How to claim Airdrop
    • How to import wallet from MetaMask to metapro
    • Supported devices
  • ⛓️metapro protocol
    • API
      • Users service
      • Teams service
      • Apps service
      • Nft service
      • Nft events service
    • Meta asset
    • Metadata structure
    • Protocole structure
    • Unity Plugin
      • About metapro Unity plugin
      • What's new
      • Guides
        • Installation
        • Requirements
        • Package samples
        • Quick start
          • 1. Editor
            • Access tool
            • Import game key
            • Download resources
            • App data object
            • Change game key
            • Use app data in script
          • 2. Play mode (PC)
            • Enable Web3 in your game
            • Choose provider
            • Connect wallet
            • Login with Web3
            • Display user data
            • Show app tokens
            • Use user and app data from script
          • 3. Play mode (Mobile)
            • Enable Web3 in Your game
            • Choose provider
            • Connect wallet
            • Login with Web3
        • AFP (Additional Features Packages)
          • 1. Safe token transfer
          • 2. Phoenix
        • Troubleshooting
      • Reference
        • MetaproAPPSetup
        • Editor Window
        • Plugin Manager
        • Web3 connection providers
          • metapro
          • Wallet Connect
          • MetaMask
        • WindowController
        • AFP (Additional Features Packages)
          • SafeTransferFrom
          • Phoenix
  • 🛠️WALLET CONNECTOR
    • Introduction
    • Basic informations
      • Next 13 integration
      • React integration
      • Manual installation
  • 👨‍💻Developer Documentation
    • Introduction to Developer Documentation
      • What is a Meta asset?
      • What are the Benefits of Using Tokens as Access Keys for the Game Application
      • Why should I Choose the Meta Assets as the Access Keys for the Game Application?
      • How Does It Work, Exactly?
    • Available Environments
    • Blockchain Communication and information retrieval
      • How can we verify/distinguish a user?
      • How can we track a user's transactions?
      • What information can we obtain?
    • Integration with the Leaderboard service
    • Integration for in-Wallet Apps
    • Integration for Telegram Mini Apps
      • Integration Architecture and Configuration
      • Authorization and Session Management
      • Example Integration and Features
      • Code Examples from the Repository
      • Summary and Appendices
    • Developer documentation for the Construct 3 Plugin
      • Construct 3 - Install plugin
      • Plugin Configuration
      • User onboarding and authorization
      • User Management
      • Score System
      • Leaderboard System
      • Referral System
      • Gameplay
      • Smart Contract Interactions
      • User NFTs
      • Error Handling
      • Additional Getters for Plugin Properties
    • Integration Web3 with Your Game
      • What is Web3
      • Blockchain Basics
      • Differences between chains
      • What is a NFT
      • Advantages of Web3 Gaming
      • Examples of Web3 Games
    • Onboarding the Web3 Player
      • Value for Players
      • Explanation of Cryptocurrency Wallet
      • Rewards for Tournament Participation
      • Reselling Owned Assets
      • Integration of Metapro Wallet Connector
      • Displaying Data for Unlogged Users
      • How to Get Authorization Data
      • User Authorization Benefits
    • Creating Your First Meta Asset
      • The Difference between NFT and Meta Asset
      • Security and Transparency
      • Concept and Value of Meta Assets
      • How and Where to Create Your Meta Asset
        • Step-by-Step Guide on How to Create Your Asset
        • Explanation of URI (Metadata structure)
        • Explanation of the Meta Asset Data taken from our Back End
    • Implementing Meta Assets into Your Game
      • Integrate your Meta Asset to your game using Unity
      • Verify User Tokens Ownership
      • Displaying All User-Owned Tokens
      • Displaying All Assets Assigned to the Game on the Metapro Market
    • Smart Contracts
      • MetaproINS
        • Read Contract
        • Write Contract
      • MetaproBuyNow
        • Read Contract
        • Write Contract
      • MetaproAuction
        • Read Contract
        • Write Contract
      • MetaproMetaAsset
        • Read Contract
        • Write Contract
      • MetaproRoyalty
        • Read Contract
        • Write Contract
      • MetaproReferral
        • Read Contract
        • Write Contract
      • MetaproAirdrop
        • Read Contract
        • Write Contract
    • Universal Links & App Links with WalletConnect
  • 🔎General information
    • Blockchain
    • Blockchain Network Fee
    • Blockchain Native Token
    • Token ERC-1155 vs ERC-721
  • 📄Release Notes
    • Introduction to the Release Notes
    • Marketplace Updates
      • Release 07.03.2024
      • Release 06.03.2024
      • Release 04.03.2024
      • Release 19.02.2024
      • Release 24.01.2024
      • Release 09.01.2024
      • Release 03.01.2024
      • Release 21.12.2023
      • Release 18.12.2023
      • Release 13.12.2023
      • Release 12.12.2023
      • Release 02.12.2023
      • Release 30.11.2023
      • Release 24.11.2023
      • Release 22.11.2023
      • Release 17.11.2023
      • Release 13.11.2023
      • Release 09.11.2023
      • Release 08.11.2023
      • Release 07.11.2023
      • Release 31.10.2023
      • Release 26.10.2023
      • Release 25.10.2023
      • Release 24.10.2023
      • Release 18.10.2023
      • Release 05.10.2023
      • Release 03.10.2023
      • Release 29.09.2023
      • Release 18.09.2023
      • Release 14.09.2023
      • Release 12.09.2023
      • Release 06.09.2023
      • Release 25.08.2023
      • Release 17.08.2023
      • Release 04.08.2023
      • Release 31.07.2023
      • Release 21.07.2023
      • Release 18.07.2023
      • Release 13.07.2023
    • Games Launcher Updates
      • Release 13.03.2024
      • Release 24.01.2024
      • Release 04.01.2024
      • Release 22.11.2023
      • Release 03.10.2023
      • Release 31.07.2023
      • Release 27.07.2023
      • Release 20.07.2023
      • Release 13.07.2023
    • Wallet Updates
      • Release 04.03.2024
      • Release 03.10.2023
      • Release 29.09.2023
      • Release 15.09.2023
      • Release 30.08.2023
      • Release 18.07.2023
Powered by GitBook
On this page
  • What Information Can We Display?
  • Integrate the leaderboard service into your app
  • default
  1. Developer Documentation

Integration with the Leaderboard service

PreviousWhat information can we obtain?NextIntegration for in-Wallet Apps

Last updated 8 months ago

The Leaderboard Service is responsible for providing information about challenges, both active and past, as well as managing data related to user scores in these challenges.This service is designed to facilitate the retrieval of challenge-related data, including details about ongoing and historical challenges, and it also handles the transmission of user-specific scores within these challenges.

What Information Can We Display?

The most important data that we can display includes the user's Wallet Address, their Game Score, and their current position on the leaderboard. Additionally, we have created an endpoint /scores/personal/{userId}/{challengeId} that is useful when a user logs in to display information about their position and the positions of users both ahead and behind them.


Integrate the leaderboard service into your app

To integrate the leaderboard service into your app, you can use our API.

default

GET /challenges

This endpoint allows you to retrieve information about currently active challenges. You can view challenges and filter them based on various parameters.

Authentication

  • Authentication is not required to access this endpoint.

Environments:

  • Production

  • User Acceptance Testing (UAT)

  • Development (DEV)

Query parameters

Name

Description

skip

(number, optional): The number of records to skip in the response.

limit

(number, optional): The maximum number of records to return in the response.

challengeId

(string, optional): Filter challenges by challenge ID.

name

(string, optional): Filter challenges by name.

gameId

(string, optional): Filter challenges by game ID.

map

(string, optional): Filter challenges by the specific map or level.

elympicsGameIds

(array of strings, optional): Filter challenges by multiple Elympics game IDs.

gameIds

(array of strings, optional): Filter challenges by multiple game IDs.

maps

(array of strings, optional): Filter challenges by multiple map names.

elympicsGameIds

(array of strings, optional): Filter challenges by multiple Elympics game IDs.

Example cURL
curl -X 'GET' \
  'https://test-api.metaproprotocol.com/ms/leaderboard/challenges' \
  -H 'accept: */*'
Example response body (200 OK)
{
  "_id": "64cb761b267ef946a3986ee3",
  "challengeId": "e851683a-55ce-4b9a-9169-09ba5b89a111",
  "elympicsUserId": "95254826-ca97-4416-ae95-59c9ac2aa98c",
  "elympicsGameId": "f6239ae6-1111-4b4c-a741-771b85bf8871",
  "endedAt": "2023-08-04T12:50:08.046Z",
  "gameId": "eddb2e98-468a-4d70-977b-553d67d8f18c",
  "matchId": "327b4d12-a0b3-4473-b831-e5719a9d9627",
  "points": 2192.2273,
  "position": 1
}
Example of the response body (404 Not found)
{
    "message": "Cannot GET /scores5",
    "error": "Not Found",
    "statusCode": 404
}

GET /challenges/challenge/{challengeId}

This endpoint allows you to retrieve information about a specific challenge, including details such as its start time, associated game, map, and more. To access this information, you need to provide the challengeId as a required parameter

Authentication

  • Authentication is not required to access this endpoint.

Environments:

  • User Acceptance Testing (UAT)

Query parameters

Name

Description

challengeId

(string, required): The unique identifier for the challenge you want to retrieve information about.

Example cURL
curl -X 'GET' \
  'https://test-api.metaproprotocol.com/ms/leaderboard/challenges/challenge/e851683a-55ce-4b9a-9169-09ba5b89a111' \
  -H 'accept: */*'
Example response body (200 OK)
{
  "_id": "64caa4bb58965c9bfe0a28ea",
  "gameId": "1009b077-98b5-4625-8fe3-74399826b190",
  "startDate": "2023-08-02T14:16:49.766Z",
  "endDate": "2023-08-07T18:31:49.766Z",
  "map": "classic",
  "elympicsGameId": "f6239ae6-1111-4b4c-a741-771b85bf8871",
  "challengeId": "e851683a-55ce-4b9a-9169-09ba5b89a111"
}
Example of the response body (404 Not found)
{
    "message": "Challenge not found",
    "error": "Not Found",
    "statusCode": 404
}

POST /scores/score

This endpoint allows you to send information about a user's current game score. To make a successful request, you need to provide the leaderboardAPIkey , which is encrypted to prevent fraudulent submissions to our leaderboard.

Authentication

  • Authentication with API KEY is required to access this endpoint.

Environments:

Query parameters

Name

Description

leaderboardAPIkey

(string, required): The encrypted API key for leaderboard access.

Example request sent (201 OK)
{
  "gameId": "string",
  "map": "classic",
  "elympicsUserId": "string",
  "walletAddress": "0x3203c9e46ca618c8c1ce5dc67e7e9d75f5da2377",
  "matchId": "123123",
  "startedAt": "2023-09-25T09:17:00.416Z",
  "endedAt": "2023-09-25T09:17:00.416Z",
  "roundData": {
    "score": 100,
    "diamonds": 5,
    "jumps": 12
  }
}
Example of the response body (401 - Unauthorized)
{
  "message": "Unauthorized",
  "statusCode": 401
}

GET /scores

This endpoint allows you to retrieve information about the current scores of a player. Authentication is not required to access this API. You can view and filter the leaderboard of a specific challenge using various parameters.

Authentication

  • Authentication is not required to access this endpoint.

Environments:

Query parameters

Name

Description

skip

(number, optional): The number of records to skip in the response.

limit

(number, optional): The maximum number of records to return in the response.

challengeId

(string, optional): Filter scores by challenge ID.

map

(string, optional): Filter scores by the specific map or level.

elympicsUserId

(string, optional): Filter scores by the player's user ID.

matchId

(string, optional): Filter scores by match ID.

position

(number, optional): Filter scores by player's position.

startedAt

(string, optional): Filter scores by the start date and time.

endedAt

(string, optional): Filter scores by the end date and time.

elypicsUserIds

(array of strings, optional): Filter scores by multiple player user IDs.

gameIds

(array of strings, optional): Filter scores by multiple game IDs.

Example cURL
curl -X 'GET' \
  'https://test-api.metaproprotocol.com/ms/leaderboard/scores' \
  -H 'accept: */*'
Example response body (200 OK)
{
  "_id": "64cb761b267ef946a3986ee3",
  "challengeId": "e851683a-55ce-4b9a-9169-09ba5b89a111",
  "elympicsUserId": "95254826-ca97-4416-ae95-59c9ac2aa98c",
  "elympicsGameId": "f6239ae6-1111-4b4c-a741-771b85bf8871",
  "endedAt": "2023-08-04T12:50:08.046Z",
  "gameId": "eddb2e98-468a-4d70-977b-553d67d8f18c",
  "matchId": "327b4d12-a0b3-4473-b831-e5719a9d9627",
  "points": 2192.2273,
  "position": 1
}
Example of the response body (404 Not found)
{
    "message": "Cannot GET /scores5",
    "error": "Not Found",
    "statusCode": 404
}

GET /scores/personal/{userId}/{challengeId}

This endpoint allows you to retrieve information about a specific user's scores, including scores of users positioned ahead and behind them in the leaderboard. To access this information, you need to provide the userId and challengeId as required parameters, as well as optional parameters for the number of positions ahead and behind.

Authentication

  • Authentication is not required to access this endpoint.

Environments:

Query parameters

Name

Description

scoresBefore

(number, optional): The number of positions backward in the leaderboard to include in the response.

scoresAfter

(number, optional): The number of positions forward in the leaderboard to include in the response.

userId

(string, required): The user ID for which you want to retrieve personal scores.

challengeId

(string, required): The ID of the challenge associated with the scores.

Example cURL
curl -X 'GET' \
  'https://test-api.metaproprotocol.com/ms/leaderboard/scores/personal/e240c9a8-5b06-4686-a847-433982607f99/e851683a-55ce-4b9a-9169-09ba5b89a111?positionsBack=1&positionsForward=1' \
  -H 'accept: application/json'
Example response body (200 OK)
[
  {
    "_id": "64cb761b267ef946a3986ee3",
    "challengeId": "e851683a-55ce-4b9a-9169-09ba5b89a111",
    "elympicsUserId": "95254826-ca97-4416-ae95-59c9ac2aa98c",
    "elympicsGameId": "f6239ae6-1111-4b4c-a741-771b85bf8871",
    "endedAt": "2023-08-04T12:50:08.046Z",
    "gameId": "eddb2e98-468a-4d70-977b-553d67d8f18c",
    "matchId": "327b4d12-a0b3-4473-b831-e5719a9d9627",
    "points": 2192.2273,
    "position": 1
  },
  {
    "_id": "64caa4ca267ef946a38f7548",
    "challengeId": "e851683a-55ce-4b9a-9169-09ba5b89a111",
    "elympicsUserId": "e240c9a8-5b06-4686-a847-433982607f99",
    "elympicsGameId": "f6239ae6-1111-4b4c-a741-771b85bf8871",
    "endedAt": "2023-08-03T10:25:17.473Z",
    "gameId": "eddb2e98-468a-4d70-977b-553d67d8f18c",
    "matchId": "58959652-eef1-4e5b-a5a0-4f8f504f724f",
    "points": 2002.6027,
    "position": 2
  },
  {
    "_id": "64cceff1267ef946a3a772de",
    "challengeId": "e851683a-55ce-4b9a-9169-09ba5b89a111",
    "elympicsUserId": "1f87d44b-e98e-4094-bf12-7f57a8fee1a2",
    "elympicsGameId": "f6239ae6-1111-4b4c-a741-771b85bf8871",
    "endedAt": "2023-08-04T03:55:03.158Z",
    "gameId": "eddb2e98-468a-4d70-977b-553d67d8f18c",
    "matchId": "204cf0ae-e59b-44eb-95c6-c46b006616ab",
    "points": 1989.1409,
    "position": 3
  }
]
Example of the response body (404 Not found)
{
  "message": "User not found",
  "error": "Not Found",
  "statusCode": 404
}

Production

Development (DEV)

Production

User Acceptance Testing (UAT)

Development (DEV)

Production

User Acceptance Testing (UAT)

Development (DEV)

Production

User Acceptance Testing (UAT)

Development (DEV)

👨‍💻
https://api.metaproprotocol.com/ms/leaderboard/docs/#/default/findAll
https://uat-api.metaproprotocol.com/ms/leaderboard/docs/#/default/findAll
https://test-api.metaproprotocol.com/ms/leaderboard/docs/#/default/findAll
https://api.metaproprotocol.com/ms/leaderboard/docs/#/default/getChallengeById
https://uat-api.metaproprotocol.com/ms/leaderboard/docs/#/default/getChallengeById
https://test-api.metaproprotocol.com/ms/leaderboard/docs/#/default/getChallengeById
https://api.metaproprotocol.com/ms/leaderboard/docs/#/default/createScore
https://uat-api.metaproprotocol.com/ms/leaderboard/docs/#/default/createScore
https://test-api.metaproprotocol.com/ms/leaderboard/docs/#/default/createScore
https://api.metaproprotocol.com/ms/leaderboard/docs/#/default/getScores
https://uat-api.metaproprotocol.com/ms/leaderboard/docs/#/default/getScores
https://test-api.metaproprotocol.com/ms/leaderboard/docs/#/default/getScores
https://api.metaproprotocol.com/ms/leaderboard/docs/#/default/getPersonalScoresByChallengeId
https://uat-api.metaproprotocol.com/ms/leaderboard/docs/#/default/getPersonalScoresByChallengeId
https://test-api.metaproprotocol.com/ms/leaderboard/docs/#/default/getPersonalScoresByChallengeId