Embedded Wallets
How to
Wallet Operation
Refresh Rampable Token

Refresh Rampable Access Token

API Documentation: Refresh Rampable Access Token

Overview

This API endpoint allows you to refresh the rampableAccessToken. The rampableAccessToken is a token that is used to access the Rampable Operation endpoint.

  • HTTP Method: POST
  • Endpoint: /api/<VERSION>/wallet/refresh-rampable

Request Body Parameters

Example Request Body

{
    "rampableAccessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0YjUxNGY0MzU4ZGVjY2FkYWY4MDA5MSIsImVtYWlsIjoiZGVuZGl0b3BydG1AZ21haWwuY29tIiwibmFtZSI6IkRlbmRpdG8gUHJhdGFtYSIsInJvbGUiOiJhZG1pbiIsInBvbGljeSI6IjY0OTE0YTY3Z...",
}

Request

Request Headers

  • Authorization (required): JWT token which was generated when user login and do not have an MPC wallet.
  • x-client-secret (required): Client secret which was generated when register in Xellar Embedded Wallet API Service Dashboard.

Example Request Syntax

curl -X POST -H "Content-Type: application/json" -H "x-client-secret: $YOUR_CLIENT_SECRET" -H "Authorization: Bearer $YOUR_WALLET_TOKEN" -d '{
    "rampableAccessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6I...",
}' <BASE_URL>/api/<VERSION>/wallet/refresh-rampable

Response

The response will include a JSON object with the following properties:

  • status (number): The HTTP status code of the response (e.g., 200 for success).
  • message (string): A message providing additional information about the operation.
  • data (object): An object containing the rampable access token.
    • rampableAccessToken : JWT token used to access the Rampable Operation endpoint.

Example Response

{
    "status": 200,
    "message": "Refresh Success",
    "data": {
        "rampableAccessToken": "your_rampable_access_token_here",
    }
}