/auth

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

This endpoint is used to check that your API key works. Generally API keys are only disabled in the event of billing issues. Requests to the /auth endpoint have no cost.

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_msNumberTime 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.

Programming language

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

Validate an API key
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;
}