Retrieve user info and wallet addresses
Overview
Your app can use the user's Mavis ID to retrieve their wallet addresses and profile information. The wallet addresses include the Mavis ID wallet address generated when the user signs up for Mavis ID, and the Ronin Wallet address linked by the user through the account dashboard. In the future, Sky Mavis plans to enable cross-app data sharing with user permission.
This API endpoint requires an API key from the Developer Console and should be called from the backend (server-side) to protect your API key from being exposed and misused.
Prerequisites
- An API key and app ID from the Developer Console. For more information, see Create an app to get an API key and app ID.
- The user's Mavis ID.
Steps
Form an HTTP GET request to the user profile endpoint with the user's Mavis ID.
Request:
curl --location 'https://api-gateway.skymavis.com/account/v2/rpc/get-user-profile/<userID>' \
--header 'X-Api-Key: <YOUR_API_KEY>' \
--header 'X-App-Id: <YOUR_APP_ID>'
Parameters:
<userID>
: The Mavis ID of the user whose information you want to retrieve. For example,1eda5fc0-76e1-6de4-8449-b3a0fde29125
.<YOUR_API_KEY>
: Your API key from the Developer Console.<YOUR_APP_ID>
: Your app ID from the Developer Console.
Response:
{
"account.wallet.identity": "0x90b2b144e02c8ad301214190f063e06f74982505", // User's Mavis ID wallet address
"account.wallet.secondary": "0x6fda69632c0393c6f740323bd402993d933a7b2b", // User's Ronin Wallet address linked to the Mavis ID
"profile.name": "Lunacian", // User's name
}
The data returned by the API follows a structured format as <tenant>.<property>
, where tenant
indicates the origin and property
points at the specific attribute. For example, the property wallet.identity
in the account
tenant refers to the user's Mavis ID wallet address.