Skip to main content

Get user profile and wallet addresses from Ronin Waypoint

Overview

This guide walks you through the steps to retrieve user information and wallet addresses associated with a Ronin Waypoint account by sending a request to the user profile endpoint. Based on the number of wallet addresses associated with the account, you can choose how to handle the wallets in your game.

Prerequisites

  • An app created in the Ronin Developer Console.
  • Initialize and set up configuration for your project following this guideline
  • The JSON Web Token (JWT) of the Ronin Waypoint account whose information you want to retrieve. The JWT is returned by Ronin Waypoint after authentication.

Steps

Step 1. Understand the user's account and wallets

The user's Ronin Waypoint account includes the following information:

{
"sub": "1effe475-xxxx-xxxx-xxxx-acdc09a306f4", // User's ID
"email": "lunacian@gmail.com", // User's email
"name": "Lunacian", // User's profile name
"wallet": {
"identity": "0x123...", // Keyless wallet address
"secondary": "0x456...", // Optional seed-phrase Ronin Wallet, if linked by the user
"default": "wallet.secondary" // Default wallet set by the user
}
}
KeyDescriptionUse for
subThe user's ID.Use this name to personalize the user experience.
emailThe user's email.Use this name to personalize the user experience.
nameThe user's display name that appears in games such as Axie Infinity.Use this name to personalize the user experience.
wallet.identityThe user's keyless wallet created either through the waypoint.roninchain.com page, or in the Ronin Wallet mobile app or browser extension.Treat this wallet as the user's spending account for in-game transactions and purchases, enabling the user to purchase, swap, and mint assets across Ronin games. It also supports actions like collecting daily check-ins and sending tokens or NFTs to other users.
wallet.secondaryA seed phrase Ronin Wallet that is present if the user linked it on the account management page.Treat this wallet as the user's savings account for staking tokens or NFTs for rewards and governance, and storing valuable assets.
wallet.defaultThe default wallet for the user's account as set by the user on the account management page.Use this wallet as the primary wallet for the user's account.

Step 2. Send the request

To retrieve user information and wallet addresses, send a POST request to the user profile endpoint with the user JWT token.

Request:

curl --location 'https://waypoint.roninchain.com/api/public/get-profile' \
--header 'Content-Type: application/json' \
--data '{
"id_token": "{USER_JWT}"
}'

Parameters:

  • {USER_JWT}: the Json Web Token of the account you want to retrieve information for.

Response:

{
"sub": "1effe475-xxxx-xxxx-xxxx-acdc09a306f4", // User's ID
"email": "lunacian@gmail.com", // User's email
"name": "Lunacian", // User's profile name
"wallet": {
"identity": "0x123...", // Keyless wallet address
"secondary": "0x456...", // Optional seed-phrase Ronin Wallet, if linked by the user
"default": "wallet.secondary" // Default wallet set by the user
}
}

Step 3. Choose how to handle the wallets

Depending on the number of wallet addresses associated with a Ronin Waypoint account, you can choose one of the following implementations:

Number of wallet addressesSuggested implementation
One addressQuery this wallet for all transactions and authentication needs.
Two addressesChoose one of the following:
  • Query both wallets: retrieve information from both the identity and secondary wallets.
  • Pick only one wallet: prioritize the identity wallet over the secondary wallet.
  • Let the user choose which wallet to use: provide an interface allowing the user to select which wallet to use.