!

/auth

GET
https://api.houski.ca/auth

Check that your API key works. Keys are typically only disabled for billing issues. Requests to /auth do not bill per call.

Example use cases

  1. Say 'hello world!' to the Houski API.
  2. Check that your Houski API key is valid.

Request parameters

NameRequiredTypeDescription
api_keyYesUUID v4Your API key for authorization

Response object

Type declarations are available at the bottom of this page.

NameTypeDescription
api_key_authorizedBooleanIndicates if the API key is authorized.
errorStringDetails about the error. Empty if no error.
time_msIntegerTime taken for the request to complete in milliseconds.

Example requests and responses

Programming language

Select the programming language you want to display the code examples in.

Validate API key and check account status
Verify your API key and check account status. Useful for troubleshooting authentication, monitoring account health, or confirming your key works before other calls. The auth endpoint does not bill per call.
Request
Shell session
curl -X GET "https://api.houski.ca/auth?api_key=YOUR_API_KEY"
TypeScript code
const houski_validate_api_key = async (): Promise<AuthResponse> => {

    // You must copy the AuthResponse type declarations from the 
    // Houski API documentation to strongly type the response

    const url = new URL('https://api.houski.ca/auth');
    url.searchParams.set('api_key', 'YOUR_API_KEY');

    const response = await fetch(url);
    const data = await response.json();

    return data;
}

(async () => {
let data: AuthResponse = await houski_validate_api_key();

// Log the response
console.log(data);
})();
Response
JSON
{
  "api_key_authorized": true,
  "error": "",
  "time_ms": 0
}

Response type declarations

TypeScript code
interface AuthResponse {
    api_key_authorized: boolean;
    error: string;
    time_ms: number;
}