/v1/me
API-Key noetig Allgemein Info zum eigenen Client (Name, Plan, Rate-Limit).
Beschreibung
Praktisch, um schnell zu pruefen, dass ein API-Key gueltig ist und welcher Plan zugeordnet ist.
Beispiel-Aufruf
curl -sS \
-H "X-API-Key: ak_test_<DEIN_KEY>" \
"https://astroapi.services/v1/me"
<?php
$ch = curl_init("https://astroapi.services/v1/me");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: ak_test_<DEIN_KEY>"]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
<?php
require 'astroapi-client.php';
$api = new AstroApiClient('ak_test_<DEIN_KEY>');
$response = $api->me();
print_r($response);
const response = await fetch('https://astroapi.services/v1/me', {
method: 'GET',
headers: { 'X-API-Key': 'ak_test_<DEIN_KEY>' },
});
const data = await response.json();
console.log(data);
import { AstroApiClient } from './astroapi-client.js';
const api = new AstroApiClient('ak_test_<DEIN_KEY>');
const response = await api.me();
console.log(response);
import requests
url = 'https://astroapi.services/v1/me'
headers = {'X-API-Key': 'ak_test_<DEIN_KEY>'}
response = requests.get(url, headers=headers)
print(response.json())
from astroapi_client import AstroApiClient
api = AstroApiClient('ak_test_<DEIN_KEY>')
response = api.me()
print(response)