Use Basic Auth to connect Tango API

Although we still support Basic Authentication (Auth), we strongly encourage you to use OAuth 2.0 with Tango API. Basic Auth is less secure compared to OAuth. It relies on platform name and API key to identify you as the correct person with the online account credentials.

πŸ“˜

Note:

To enable Tango API keys for your production Tango platform, contact your Customer Success Manager (CSM) or [email protected] . You need the Tango API Key permission in the portal to access the API credentials. See how to Sign in to the Tango portal . If you don't have an account with Tango, see how to set up an account .

πŸ‘

Best practices:

  • For your security, Tango API key is masked in the Tango portal. Treat your API keys like passwords and do not share them with unauthorized parties or over unsecured communication channels.
  • You can have up to two active API keys at the same time. However, we recommend you to keep only one active API key unless when you’re rotating your keys.
  • Rotate API keys at least once every six months AND whenever someone who's had access to the key leaves the company. To avoid disruption when you rotate the keys, keep two API keys active until your integration is updated successfully. Deactivation cannot be undone.

How to use Basic Auth to secure your connection?

Follow the instructions below:

Step 1: Get the platform name and API key

You must have manage permissions for Tango API keys enabled for your user under the Integrations permissions. With the correct permissions, log in to the Tango portal and access the platform name and the API key. Be mindful of production vs. sandbox environment. Tango allows API developers to test using a sandbox environment before going live. See Set up work environment for Tango API. Learn how to Set user permissions and access level.

To get the platform name and API key in the Tango portal:

  1. Log in to the Tango portal. See how to Sign in to Tango portal.
  2. Go to Team settings > API credentials on the left menu.
  3. Click API keys > Create credentials.
  4. Click copy next to the Platform name and API key, and keep them safe.
  5. (Optional) Enter a Display name to identify it later, then click Save display name.
    A new key is generated and immediately accessible for use. You can have up to two active keys at any time.

Step 2: Test your integration

With your platform name and API key at hand, test your integration in Tango API test console to make sure the integration is working:

  1. Open the Tango API test console.

  2. Navigate to the API function you want to test, such as Get a list of all customers.

  3. Make sure the credentials is set to Basic for Basic Auth.

  4. Enter your platform name and password (API key) you've got from the Tango portal.

  5. Click Try it to check the response. Verify the connection is established successfully.

    [
      {
        "customerIdentifier": "G23539018",
        "displayName": "Sales",
        "status": "active",
        "createdAt": "2022-08-08T19:30:03.391Z",
        "accounts": [
          {
            "accountIdentifier": "A99301743",
            "accountNumber": "A99301743",
            "displayName": "Sales Incentive",
            "createdAt": "2022-08-08T19:30:03.746Z",
            "status": "ACTIVE",
            "currencyCode": "USD"
            }
        ]
      }
    ]
    

Step 3: Call the Tango API

Once you verify the integration is working, use your platform name and API key to generate an authorization header and call the API. See the example below:

 OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://integration-api.tangocard.com/raas/v2/customers")
  .get()
  .addHeader("accept", "application/json")
  .addHeader("authorization", "Basic Authorization header")
  .build();

Response response = client.newCall(request).execute();
```

How to deactivate API keys?

See our document Manage Basic Auth API keys in Tango.


© 2025 Tango API are provided by Tango, a division of BHN, Inc.