Live

User Availability API Documentation

Introduction

This API allows you to check the availability of a user in the system by providing a username. The API requires authentication via an API key passed in the request headers.

Base URL

https://unapi.odecent.info

Authentication

All API requests must include the X-API-KEY header with your valid API key.

X-API-KEY: your_api_key_here

API Endpoints

GET /get_user_available/{username}

Check if a user exists in the system by username.

Path Parameters

Parameter Type Required Description
username string Required The username to check for availability

Headers

Header Type Required Description
X-API-KEY string Required Your API key for authentication

Responses

Status Code Description Response Body
200 User exists
{ "Success": true, "message": "User exists" }
404 User not found
{ "Success": false, "message": "User not found" }
401 Unauthorized
{ "detail": "Unauthorized" }
500 Internal Server Error
{ "detail": "Internal Server Error" }

Examples

cURL
curl -X GET \
-H "X-API-KEY: your_api_key_here" \
"https://unapi.odecent.info/get_user_available/admin123"
Python (requests)
import requests

url = "https://unapi.odecent.info/get_user_available/admin123"
headers = {
"X-API-KEY": "your_api_key_here"
}

response = requests.get(url, headers=headers)
print(response.json())
JavaScript (fetch)
const url = "https://unapi.odecent.info/get_user_available/admin123";
const options = {
method: 'GET',
headers: {
'X-API-KEY': 'your_api_key_here'
}
};

fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(err => console.error(err));
Node.js (axios)
const axios = require('axios');

const config = {
method: 'get',
url: 'https://unapi.odecent.info/get_user_available/admin123',
headers: {
'X-API-KEY': 'your_api_key_here'
}
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});

Error Handling

The API returns standard HTTP status codes to indicate success or failure:

Status Code Meaning Possible Reasons
200 OK Request was successful
401 Unauthorized Missing or invalid API key
404 Not Found User does not exist
500 Internal Server Error Server encountered an unexpected condition