Verify Api Key Example (Node.js)
Below is an example of verifying the Api Key written in TypeScript using Node.js.
using System;
using System.Text;
namespace Example.WebHooks.Payload
{
public class Verifier
{
public bool VerifyApiKey(string requestApiKey, string generatedApiKey)
{
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).