Skip to main content
Glama
apiValidation.ts823 B
/** * Validates a HyperFeed API key by making a request to the validation endpoint * @param token The API key to validate * @returns Promise<boolean> indicating if the key is valid */ export async function validateHyperFeedApiKey(token: string): Promise<boolean> { try { console.log("Validating API key..."); const response = await fetch("https://app.hyperfeed.ai/api/validate-key", { method: "POST", headers: { Authorization: `Bearer ${token}`, }, }); if (response.ok) { console.log("HyperFeed API key validation successful"); return true; } else { console.error( "HyperFeed API key validation failed:", response.status, response.statusText, ); return false; } } catch (error) { console.error("HyperFeed API key validation error:", error); return false; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/synthetic-ci/vibe-marketing'

If you have feedback or need assistance with the MCP directory API, please join our Discord server