Authentication
This page describes how you make a call to our APIs. The header properties and the required parameters needed to make a successful API call.
Last updated
This page describes how you make a call to our APIs. The header properties and the required parameters needed to make a successful API call.
Last updated
Every API endpoint requires some form of authentication using a bearer token header and two major header parameters. The key required for each request is your API Key. To enable communication between your application and Terraswitch, you'll need your API Key. Terraswitch authenticates every request your application makes with your API key. Generally, every corporate account comes with a single API Key for Staging and Live accounts. Your API key is required for accessing any financial data and can be used to make any API call on your account. Your key should never be shared on any client-side code or exposed on any application that is not yours. Treat them like any other password. And, if for any reason you believe your API key has been compromised simply reset them by generating new key. You can generate new API key from your dashboard.
For every endpoint, you must specify the headers below.
Content-Type
"application/json"
Request content type
lg
"en"
Language Type. This value should be "en"
ch
"web"
Channel Type. This is defaulted to "web" but can be any of "web", "mobile", "watch" or "desktop"
Authorization
"Bearer {{ YOUR_API_KEY }}"
Token for authourization
Your API key is always available on your dashboard. To find your API key,
Login to your Terraswitch account
Navigate to "Settings" on the side menu
Click "Webhook & API Key" on the sub-menu
In the Vacepay API Keys section, you’d see both your API Key and Webhook configuration section. You'll also see a button to generate a new API Key and make changes to your preferred webhook URL.
You should always keep your API keys safe and protect your account. However, in the event where your API keys have been compromised, you can easily generate new API keys. Simply click the "Re-Generate Key" button under the "Your API Key" section on the API Keys page.
If you fail to include your key when making an API request or provide an incorrect key, Terraswitch will respond with an error message. Check sample error below