Authentication
Endpoint to authenticate your account. The API will return a token to authorize subsequent API requests.
Authenticate your account
POST https://api.waldo.ai/authenticate
Request Body
Name
Type
Description
apiKey*
String
clientSecret*
String
Response
{
"token": "eyJh...."
}{
"code": "API_KEY_REVOKED",
"message": "This API key has been revoked. Please visit the Waldo AI dashboard to review your API key."
}{
"code": 'MISSING_PARAMETERS',
"message": 'Missing parameters'
}curl --location 'https://api.waldo.ai/authenticate' \
--data '{"apiKey": "YOUR_API_KEY","clientSecret": "CLIENT_SECRET"}'import axios from "axios";
const data = JSON.stringify({
"apiKey": "YOUR_API_KEY",
"clientSecret": "CLIENT_SECRET"
});
const config = {
method: 'post',
url: 'https://api.waldo.ai/authenticate',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});import requests
import json
url = "https://api.waldo.ai/authenticate"
payload = json.dumps({
"apiKey": "YOUR_API_KEY",
"clientSecret": "CLIENT_SECRET"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json'
];
$body = '{
"apiKey": "YOUR_API_KEY",
"clientSecret": "CLIENT_SECRET"
}';
$request = new Request('POST', 'https://api.waldo.ai/authenticate', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.waldo.ai/authenticate");
var content = new StringContent("{\"apiKey\": \"YOUR_API_KEY\",\"clientSecret\": \"CLIENT_SECRET\"}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Authorization
Use the token from the authentication response to authorize subsequent API requests. The token should be added in the Authorization header:
Authorization: Bearer <token>Last updated