Confirm authentication
Confirm authentication information by checking if your api key is valid.
1. API endpoint
https://app.aistudios.cn/api/odin/v3/auth
2. Response parameters
key | desc | type |
---|---|---|
isAuthenticated | Whether the API key is valid. | Boolean |
3. Sample Request
- cURL
- Node.js
- Python
curl https://app.aistudios.cn/api/odin/v3/auth \
-H "Authorization: ${API KEY}" \
-H "Content-Type: application/json" \
-X GET
import axios from "axios";
const token = ${API KEY};
const customWebhookUrl = ${webhook_delivery_address};
axios.get('https://app.aistudios.cn/api/odin/v3/auth',
{
headers: {
'Authorization': ${token},
'Content-Type': 'application/json'
}
}
)
.then((res) => {
console.log(res.data);
})
.catch((error) => {
console.error(error);
})
import requests
import json
url = "https://app.aistudios.cn/api/odin/v3/auth"
headers = {
"Content-Type": "application/json",
"Authorization": ${API TOKEN}
}
r = requests.get(url, data=json.dumps(body), headers=headers)