Secure your connection with Basic Auth
Basic Authentication or Basic Auth is a method that uses your username (Tango platform name) and password (API Key) to authenticate your connection. APIย Keys need to be enabled for your Tango platform before they are used to connect to Tango API. See how to Sign in to our Tango portal . If you don't have an account with Tango, see how to set up an account . See our great API endpoints.
Best practice:
- 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 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.
Note:
To enable RaaS API keys for your Tango platform, contact your Customer Success Manager (CSM) or [email protected] with the Tango portal administrator rights. If you donโt yet have a Tango portal, Sign up for a Tango platform.
How to connect?
Step 1: Get the platform name and API key
You can only access the Raas API keys in your Tango portal after they have been enabled for your platform. Find your Raas API key and use it in your API integration.
Note:
You must have Integrations as well as Manage Tango API keys permissions in Tango portal to access the RaaS API keys. Learn how to Set user permissions and access level.
To get the platform name and API keys:
- With the right permissions, sign in to the Tango portal.
- Click Team settings > RaaS API keys on the left menu.
- Copy the Platform name and the API key . Click the eye icon to reveal the key, then click it again to hide.
Note:
For your security, RaaS API keys are masked by default in the Tango portal. Treat your keys like passwords and do not share them with unauthorized parties or over unsecured communication channels.
- To generate new RaaS keys, go to Tango portal and click Generate API key under Team settings > RaaS API Keys. a new key is created and immediately accessible for use. The Audit log gets updated to reflect the created key.
- To deactivate RaaS API keys, go to Tango portal and click Deactivate API key under Team settings > RaaS API Keys. See Find and manage RaaS API keys in Tango.
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:
- Go to the Tango API test console.
- Navigate to the page you want to test such as Customers.
- Select Basic for AUTHENTICATION.
- Enter your username (Platform name) and password (API key) you find in Tango portal.
- Click Try it and check the response.
Step 3: Call the Tango API
Once you test and make sure the integration is working, use your Platform name and API key to to generate an authorization header and call the API as in 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();
Updated about 1 month ago