!

API recipes

Practical examples for using the Houski API.

Examples

Validate your API key

Programming language

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

Validate API key and check usage
Verify your API key and view current usage statistics and limits.
Request
Shell session
curl -X GET "https://api.houski.ca/auth?api_key=YOUR_API_KEY"
TypeScript code
const houski_recipe_data = 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_recipe_data();

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