Authentication
To access our API, you need to authenticate using an API key. We provide separate keys for development and production environments to ensure security and proper usage.
API Keys
Development Key
You will be given a development key for the implementation phase. This key has limited access and is intended for non-production environments.
Production Key
You will receive the production keys once ready for assurance testing. Ensure that these keys are kept secure and not exposed in client-side code.
Using the API Key
Include the API key in the request header as follows:
- Header Name:
X-Red-Robin-API-Key - Header Value: Your API key
Example Request
Here is are examples of how to include the API key in a request:
- C#
- Javascript
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
const client = new HttpClient();
client.DefaultRequestHeaders.Add("X-Red-Robin-API-Key", "YOUR_API_KEY");
const response = await client.GetAsync("https://api.example.com/v1/resource");
const content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
const headers = new Headers();
headers.append('X-Red-Robin-API-Key', 'API_KEY');
headers.append('Content-Type', 'application/json');
const requestOptions = {
method: 'GET',
headers: headers,
};
fetch('https://api.example.com/v1/resource', requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));