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
}
}
Key | Description | Use for |
---|---|---|
sub | The user's ID. | Use this name to personalize the user experience. |
email | The user's email. | Use this name to personalize the user experience. |
name | The user's display name that appears in games such as Axie Infinity. | Use this name to personalize the user experience. |
wallet.identity | The 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.secondary | A 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.default | The 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 addresses | Suggested implementation |
---|---|
One address | Query this wallet for all transactions and authentication needs. |
Two addresses | Choose one of the following:
|