Verify Api Key Example (Node.js)
Below is an example of verifying the Api Key written in TypeScript using Node.js.
export const verifyApiKey = (requestApiKey: string, generatedApiKey: string): boolean => {
return requestApiKey === generatedApiKey;
};
where:
requestApiKey
is the Api Key header valuegeneratedApiKey
is the Api Key generated for a WebHook, available from the organization panel (coming soon).
We strongly recommend storing the generated Api Key on the server-side (eg. in the environment variables).