API Documentation
The UptimeTea API is easy to use and free for all plans.
Check token
Validates the Bearer token and returns its user. Answers 401 with an empty body when the token is missing, expired or revoked.
GET
https://api.uptimetea.com/auth/login
Headers
-
AuthorizationREQUIREDSTRINGBearer $TOKEN
Response body
{
"id": "uuid",
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"avatar_url": null,
"locale": "en",
"timezone": "UTC",
"theme": "light",
"team_id": "uuid",
"team_name": "Acme",
"team_role": "owner",
"suspended": false,
"billing_plan": "free",
"email_verified": true,
"token": "your-api-token"
}
Code examples
curl -X GET "https://api.uptimetea.com/auth/login" \
-H "Authorization: Bearer $TOKEN"
// Check token
const response = await fetch('https://api.uptimetea.com/auth/login', {
headers: {
'Authorization': 'Bearer ' + yourToken
}
});
const data = await response.json();
console.log(data);
# Check token
import requests
headers = {'Authorization': f'Bearer {your_token}'}
response = requests.get(
'https://api.uptimetea.com/auth/login',
headers=headers
)
print(response.json())
// Check token
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.uptimetea.com/auth/login", nil)
req.Header.Set("Authorization", "Bearer "+yourToken)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(data))
}
# Check token
require 'net/http'
require 'uri'
uri = URI('https://api.uptimetea.com/auth/login')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = "Bearer #{your_token}"
response = http.request(request)
puts response.code, response.body
<?php
// Check token
$ch = curl_init('https://api.uptimetea.com/auth/login');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $yourToken
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));
curl_close($ch);