Integrate the Issuance & Redemption Universal API

Getting Started

Prerequisites

To use the Issuance & Redemption API, you need:

  1. API Key: Contact [email protected] to request your partner API key. Include your organization name and use case in your request.

  2. EVM Wallet Address: The wallet address you'll use for operations

  3. HTTPS Client: Any HTTP client library (curl, axios, fetch, etc.)

API Key Structure

Your API key follows this format:

<keyId>.<secret>

Example:

partner_abc123.sk_live_1234567890abcdef
  • keyId: Public identifier for your API key

  • secret: Private secret for authentication

Security: Never expose your API key in client-side code or public repositories. Store it securely in environment variables or secret management systems.

Authentication Flow

Step 1: Obtain JWT Token

Each JWT token is bound to a single EVM wallet address. If you need to operate with multiple wallet addresses, you must obtain separate JWT tokens for each address.

Endpoint: POST https://api.universal.xyz/auth/token

Headers:

Request Body:

Response:

cURL Example:

Step 2: Use JWT Token

Include the JWT token in the Authorization header for all subsequent API requests:

Example:

Token Lifecycle

  • Expiration: JWT tokens expire after 1 year (365 days)

  • Wallet Binding: Each token is bound to the wallet address specified during issuance

  • Refresh: Use the /token/refresh endpoint to renew an expiring token

Refreshing Tokens

Endpoint: POST https://api.universal.xyz/auth/token/refresh

Multiple Wallet Addresses

Important: If you need to use different EVM wallet addresses, you must:

  1. Obtain a new JWT token for each wallet address

  2. Use the appropriate token when making requests for that specific wallet

Example Workflow:

Next Steps

Last updated