Enin provides two primary APIs designed to deliver comprehensive insights into companies.
To start, get in touch with our sales team:
The sales team will give you access to the Enin application.
After logging into the Enin Application, you setup API access via the settings page. Click "Create api client" and you’ll receive Basic and Token Authentication credentials. Keep these secure.
Test your connection by doing a GET request to the Analysis API auth-status
with Basic HTTP Authentication. Successful authentication returns a "You are authenticated" message.
Use your Basic auth username and password
organizaition-client
Ab3124586Jpwkqnqwpiqjwrqwlqwwmsadoj6omqawz4pothpokerhj25qpwkra
curl -u "username:password" https://api.enin.ai/analysis/v1/auth-status
import requests
from requests.auth import HTTPBasicAuth
# Define the URL and credentials
url = 'https://api.enin.ai/analysis/v1/auth-status'
username = 'mym_basic_auth_username'
password = 'my_basic_auth_password'
# Make the request with Basic Authentication
response = requests.get(url, auth=HTTPBasicAuth(username, password))
# Print the response text
print(response.text)
response.text should say "You are authenticated".
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64;
public class BasicAuthRequest {
public static void main(String[] args) {
try {
String url = "https://api.enin.ai/analysis/v1/auth-status";
String username = "my_basic_auth_username";
String password = "my_basic_auth_password";
URL urlObj = new URL(url);
HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection();
String auth = username + ":" + password;
String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes());
String authHeaderValue = "Basic " + encodedAuth;
connection.setRequestProperty("Authorization", authHeaderValue);
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
System.out.println(content.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Your terminal should print out "You are authenticated".
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var client = new HttpClient();
var url = "https://api.enin.ai/analysis/v1/auth-status";
var username = "my_basic_auth_username";
var password = "my_basic_auth_password";
var byteArray = System.Text.Encoding.ASCII.GetBytes($"{username}:{password}");
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
var response = await client.GetAsync(url);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
Your console should print "You are authenticated".
Requires axios, run npm install axios
const axios = require('axios');
// API URL
const url = 'https://api.enin.ai/analysis/v1/auth-status';
const username = 'my_basic_auth_username';
const password = 'my_basic_auth_password';
// Encode credentials for Basic Auth header
const auth = Buffer.from(`${username}:${password}`).toString('base64');
axios.get(url, {
headers: {
'Authorization': `Basic ${auth}`
}
})
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error);
});
Your console.log should say "You are authenticated".
This R script uses the httr library to make the GET request: install.packages("httr")
library(httr)
# API URL
url <- "https://api.enin.ai/analysis/v1/auth-status"
# Credentials
username <- "my_basic_auth_username"
password <- "my_basic_auth_password"
# Make the request with Basic Authentication
response <- GET(url, authenticate(username, password))
content(response, "text")
You should get the result: "You are authenticated".
Use Basic HTTP Authentication for testing. For ongoing integration, switch to Token Authentication for better security. More details here: Authentication Guide. Authentication guide
Note: You do need the basic auth password/username to access the swagger documentation.
To learn more about the Enin API we recommend that you continue reading about your chosen API:
See our Authenticating with the Enin API guide for more details.