Skip to main content

Overview

This guide introduces how to use Postman to call the Wallet-as-a-Service (WaaS) 2.0 API.

Prerequisites

Create a collection

  1. Download the WaaS 2.0 API specification from GitHub.
  2. Visit https://www.postman.com/ or launch Postman on your local machine.
  3. Create a new workspace if you do not have one yet.
  4. Import the API specification you have just downloaded into the workspace. To learn how to import a specification file, see Import an API into Postman

Add a pre-request script

Use pre-request-script.js as the pre-request script of your collection. This script automatically calculates the authentication-related parameter values and adds them as your request headers. To learn how to add a pre-request script to a collection, see Reuse pre-request scripts.

Add environment variables

  1. Create an environment.
  2. Add the following environment variables to your collection:
    1. privateKey: Set it to your API secret (private key).
    2. apiKey: Set it to your API key (public key).
    3. baseUrl: Set it to https://api.dev.cobo.com/v2.
To learn how to set environment variables in Postman, see Edit and set environment variables in Postman.
  1. Make sure you have selected the environment you have just created.

Send an API request

You have now completed the initial setup. The next step is to send an API request:
  1. Choose an operation.
  2. Specify any parameters and body data if necessary,
  3. Click Send. If the request is successful, you will find the response displayed in the response section at the bottom of the page.
postman_screenshot
Feel free to share your feedback to improve our documentation!