Repliers API Authentication Guide
Overview
All API requests must include authentication using your unique API key. This key identifies your account and ensures secure access to our services.
Authentication Methods
You can authenticate using either of these methods:
Method 1: Header Authentication (Recommended)
Include your API key in the request headers:
REPLIERS-API-KEY: {your_api_key_here}
Method 2: Query String Parameter
Alternatively, you can pass your API key as a query parameter:
https://api.repliers.io/listings?repliers_api_key={your_api_key_here}
Note: Header authentication is recommended as it's more secure and keeps your API key out of server logs and browser history.
Implementation Examples
Using cURL
Header Authentication:
curl -X GET "https://api.repliers.io/listings" \
-H "REPLIERS-API-KEY: your_actual_api_key_here" \
-H "Content-Type: application/json"
Query Parameter Authentication:
curl -X GET "https://api.repliers.io/listings?repliers_api_key=your_actual_api_key_here" \
-H "Content-Type: application/json"
Using JavaScript (fetch)
Header Authentication:
const response = await fetch('https://api.repliers.io/listings', {
method: 'GET',
headers: {
'REPLIERS-API-KEY': 'your_actual_api_key_here',
'Content-Type': 'application/json'
}
});
Query Parameter Authentication:
const apiKey = 'your_actual_api_key_here';
const response = await fetch(`https://api.repliers.io/listings?repliers_api_key=${apiKey}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
Using Python (requests)
Header Authentication:
import requests
headers = {
'REPLIERS-API-KEY': 'your_actual_api_key_here',
'Content-Type': 'application/json'
}
response = requests.get('https://api.repliers.io/listings', headers=headers)
Query Parameter Authentication:
import requests
params = {
'repliers_api_key': 'your_actual_api_key_here'
}
response = requests.get('https://api.repliers.io/listings', params=params)
Using Node.js (axios)
Header Authentication:
const axios = require('axios');
const config = {
headers: {
'REPLIERS-API-KEY': 'your_actual_api_key_here',
'Content-Type': 'application/json'
}
};
const response = await axios.get('https://api.repliers.io/listings', config);
Query Parameter Authentication:
const axios = require('axios');
const response = await axios.get('https://api.repliers.io/listings', {
params: {
repliers_api_key: 'your_actual_api_key_here'
}
});
Finding Your API Key
- Log into the Developer Portal
- Navigate to the "API Keys"
- Your API key will be displayed or can be generated if you don't have one yet
Important Security Notes
- Never expose your API key in client-side code or public repositories unless it's a client-side API Key
- Use header authentication when possible as it's more secure than query parameters
- When using query parameters, be aware that API keys may appear in server logs and browser history
- Store your API key securely using environment variables or secure configuration files
- Regenerate your API key immediately if you suspect it has been compromised
- Use different API keys for different environments (development, staging, production)
Error Responses
If authentication fails, you'll receive one of these error responses:
Invalid API Key (401 Unauthorized)
{
"error": "Invalid API key",
"message": "The provided API key is not valid"
}
Best Practices
- Always use HTTPS when making API requests to protect your API key in transit
- Implement proper error handling for authentication failures
- Consider implementing API key rotation for enhanced security
- Monitor your API usage to detect any unauthorized access
- Set up rate limiting on your applications to avoid exceeding API limits
Need Help?
If you're experiencing authentication issues:
- Verify your API key is correctly formatted and hasn't expired
- Check that you're including the header name exactly as shown:
REPLIERS-API-KEY
- Ensure you're using HTTPS endpoints
- Contact our support team if problems persist
Remember to replace your_actual_api_key_here
with your real API key in all examples above.
Updated on: 04/07/2025
Thank you!