npm i -g ngrok // Install ngrok globally ngrok http 3000 // Let ngrok listen port 3000

You will need
- Tyntec API key from your tyntec account.
- A WABA (WhatsApp Business Account) provided from tyntec.
- A WABA template.
- A mobile phone with a WhatsApp application not associated with your WABA.
- Sentry account with connected application for monitoring.
- Node.js installed.
- Ngrok account and the binary installed.



git clone https://github.com/tyntec/api-samples.git // Clone quickstart repository cd api-sample // Go to cloned repository cd wa-integrations // Go to Integrations folder cd sentry // Go to Sentry sentry folder npm install // Install dependencies
2. Configure environment variables in .env:
- CLIENT_SECRET= Sentry Secret generated in step 2.2 with Internal Integration.
- PORT - (optional) Listening HTTP port for localhost. Port should match ngrok to generate a publicly visible environment for testing. Default value = 3000
- FROM - Your WABA number
- TO - Your phone number
- TYNTEC_API_KEY - Your tyntec API key
- WHATSAPP_TEMPLATE_ID - The ID of your WhatsApp template.
- WHATSAPP_TEMPLATE_LANG - A chosen language of the WhatsApp template.
Your WhatsApp template should have these parameters:
- Has no variable in the header.
- Has one variable in the body - the label of the rule that was triggered (e.g. "Very Important Alert Rule!").
- Has one Call-to-Action button with `https://sentry.io/organizations/{{1}}` dynamic URL - the web URL for the event that triggered the alert rule (an example of the URL is "https://sentry.io/organizations/test-org/issues/1117540176/events/e4874d664c3540c1a32eab185f12c5ab/").
npm start
Server listening on port 3000.

