-
Notifications
You must be signed in to change notification settings - Fork 0
Authentication
WhiteIntel Intelligence Solutions edited this page May 19, 2024
·
7 revisions
The Authentication API allows users to obtain an API key by sending a POST request with their credentials. This API key is required for accessing other protected endpoints in the system. If you do not already have an account, you need to register via WhiteIntel Register Page
Please be aware that you will not be able to view your API key after it has been generated. It is recommended to store the key in a secure vault. Alternatively, you can create a new API key at any time. Please note that generating a new key will invalidate and remove any previously created keys.
POST /api/authenticate.php
| Name | Description |
|---|---|
| Content-Type | Must be set to application/json
|
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | The username of the user | |
| password | string | Yes | The password of the user |
POST /api/authenticate.php
{
"email": "exampleUser",
"password": "examplePassword"
}{
"success": true,
"apikey": "abc123def456ghi789jkl012mno345pqr678stu"
}{
"error": "Invalid username or password"
}curl -X POST https://whiteintel.io/api/authenticate.php \
-H "Content-Type: application/json" \
-d '{
"email": "exampleUser",
"password": "examplePassword"
}'import requests
url = "https://whiteintel.io/api/authenticate.php"
payload = {
"email": "exampleUser",
"password": "examplePassword"
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
print("Response:", response.json())
else:
print("Failed to authenticate:", response.status_code, response.text)