Code Examples
JavaScript/TypeScript
// Get all instance integrations
async function getInstanceIntegrations(apiKey) {
const response = await fetch(
'https://gateway.listoglobal.com/v1/instance-integrations',
{
headers: { 'x-api-key': apiKey }
}
);
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
return await response.json();
}
// Get clients for a specific instance
async function getInstanceClients(apiKey, instanceIntegrationId) {
const response = await fetch(
`https://gateway.listoglobal.com/v1/instance-integrations/${instanceIntegrationId}/clients`,
{
headers: { 'x-api-key': apiKey }
}
);
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
return await response.json();
}Python
import requests
API_KEY = 'your-api-key'
BASE_URL = 'https://gateway.listoglobal.com'
# Get al instance integrations
def get_instance_integrations():
response = requests.get(
f'{BASE_URL}/v1/instance-integrations',
headers={'x-api-key': API_KEY}
)
response.raise_for_status()
return response.json()
# Get clients for a specific instance
def get_instance_clients(instsanceIntegrationId):
response = requests.get(
f'{BASE_URL}/v1/instance-integrations/{instsanceIntegrationId}/clients',
headers={'x-api-key': API_KEY}
)
response.raise_for_status()
return response.json()Updated about 2 months ago
