View Tokens in Wallet

The Kigo API allows partners to display and retrieve detailed information about the tokens associated with a user’s account. This guide will walk you through the process of viewing all tokens in a user's wallet and retrieving full details of a specific token.

Prerequisites

Before performing the redeem action on a token, ensure that the necessary user-level session token has been obtained. This token is required to authenticate API requests and can be acquired by following the User Client Level Authentication.

Steps to Implement

  1. Viewing All Tokens in Wallet

    • Endpoint: Retrieve the gallery of tokens.
    • Purpose: This endpoint allows the retrieval of a gallery of tokens associated with a user's account.
    • Usage: Use the user-level session token to authenticate the request. Include parameters such as offset and limit to handle pagination, and optionally apply filters to refine the list of tokens.
    • Response: The API will return a list of tokens, each containing basic details like token ID, name, description, creators, media, and tags.
  2. Retrieving Full Details of a Token

    • Endpoint: Get token by ID.
    • Purpose: After retrieving the list of tokens from the gallery, this endpoint allows you to fetch full details of a specific token using its token_id.
    • Usage: Make a request using the user-level session token and the specific token_id. This will return detailed information, including metadata, images, redemption status, and associated actions.

Key Considerations

  1. Program Specific Configuration: Ensure that your application handles data pagination effectively when retrieving the gallery of tokens. Use the offset and limit parameters to manage large datasets efficiently.
  2. Token Filtering: Consider implementing filters to help users find specific tokens. The Gallery endpoint supports filtering by various criteria, such as tags or flags.
  3. Displaying Detailed Token Information: Make sure your application displays the detailed token information clearly, including any important metadata, images, and actions that the user can take, such as redeeming or sharing the token.

Example Workflow

  1. User opens the wallet within the application.
  2. The application sends an API call using the user-level session token to retrieve the gallery of tokens.
  3. Receive Token List: The Kigo API returns a response containing the list of tokens.
  4. User selects a token from the list to view more details.
  5. API Call to Retrieve Full Token Details: The application sends a request to retrieve the full details of the selected token using its token_id.
  6. Display Token Details: The application displays the full details of the selected token in the user interface.

Best Practices for Token Management

  • Efficient Data Handling: Implement pagination and filtering to enhance the user experience and manage large datasets effectively.
  • Clear Information Display: Ensure that detailed token information is presented clearly, allowing users to understand and interact with their tokens effectively.

What’s Next