Skip to main content

How to configure Postman for Indigo X API

Step 1: Set Up Postman

Postman provides a user-friendly interface to interact with APIs. Follow these steps to configure your Postman environment for the Indigo X API.

1.1 Install Postman

Download and install Postman for your operating system from the official website. Alternatively, you can use the web version of Postman.

1.2 Import the Indigo X API Collection

The Indigo X API documentation includes a pre-configured Postman collection to simplify setup.

  1. Visit the Indigo X API documentation.

  2. Click Run in Postman in the top-right corner.

  3. Select Postman for your OS (e.g., Windows, macOS, Linux) or Postman for Web for the web version.

    Run in Postman Button

  4. In the Import Collection window, choose your Postman workspace and click Import. This copies the Indigo X API requests into your workspace.

Manual Collection Creation

If you prefer, you can manually create a collection in Postman:

  1. Click NewCollection in Postman.
  2. Name the collection (e.g., "Indigo X API").
  3. Add requests manually as needed.

Step 2: Sign In to Your Indigo X Account

To interact with the Indigo X API, you need to authenticate using your account credentials. This involves generating an MD5 hash of your password and obtaining a bearer token.

2.1 Generate an MD5 Hash of Your Password

The Indigo X API requires your password to be hashed using the MD5 algorithm.

  1. Visit an MD5 Hash Generator.
  2. Enter your Indigo X account password and generate the hash.
  3. Copy the resulting MD5 hash for use in Postman.
Security Note

Ensure you use a trusted MD5 hash generator and avoid sharing your password or hash publicly.

2.2 Sign In via Postman

Use the imported Postman collection to sign in and obtain an authentication token.

  1. In your Postman workspace, navigate to the Profile Access Management folder.

  2. Select the POST User Signin request.

  3. In the Body section, enter:

    • Your Indigo X account email.
    • The MD5 hash of your password (from Step 2.1).
  4. Click Send to execute the request.

    User Signin Request

  5. Check the response:

    • A 200 OK status indicates a successful sign-in.
    • The response body includes a token attribute, which you’ll use for subsequent requests.
Token Expiration

The bearer token expires after 30 minutes. To refresh it, use the User Refresh Token endpoint. Alternatively, use an automation token with a custom expiration period.

Step 3: Configure the Bearer Token for Requests

Most Indigo X API requests require a bearer token for authentication. Automate token usage in Postman to streamline your workflow.

3.1 Store the Token in a Collection Variable

Modify the POST User Signin request to automatically store the token.

  1. Open the POST User Signin request in Postman.

  2. Go to the Scripts tab (previously called "Tests" in some versions).

  3. Add the following JavaScript code to extract and store the token:

    const response = pm.response.json();
    const token = response.data.token;
    pm.collectionVariables.set("token", token);
  4. Save the changes.

    Scripts Token Setup

  5. Re-run the POST User Signin request to ensure the token is stored.

3.2 Set Up Authorization for the Collection

Configure the Indigo X API collection to automatically include the token in all requests.

  1. Go to the main Indigo X API collection in Postman.

  2. Switch to the Authorization tab.

  3. Set the following values:

    • Type: Bearer Token
    • Token: {{token}}
  4. Save the changes.

    Authorization Setup

Automatic Token Usage

With this setup, the {{token}} variable automatically populates the Authorization header for all requests in the collection, saving you time.

Conclusion

You’ve successfully set up the Indigo X API in Postman! With your workspace configured and bearer token automated, you can now explore the API’s full capabilities, such as creating browser profiles, managing sessions, and automating workflows. If you encounter issues, refer to the troubleshooting section or the official documentation.

Happy API testing!