Socket
Book a DemoInstallSign in
Socket

hapi-twilio-auth

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-twilio-auth

Hapi plugin for Twilio webhook authentication

0.3.0
latest
Source
npmnpm
Version published
Weekly downloads
58
93.33%
Maintainers
1
Weekly downloads
 
Created
Source

hapi-twilio-auth

Hapi plugin for Twilio request validation.

install

npm i hapi-twilio-auth

usage

import hapi from '@hapi/hapi'
import hapiTwilioAuth from 'hapi-twilio-auth'

const { Server } = hapi

async function startServer() {
  const server = new Server({
    port: 3000,
  })

  await server.register(hapiTwilioAuth)

  server.auth.strategy('twilio-auth', 'twilio-signature', {
    baseUrl: 'https://mycompany.com/webhooks-path', // your twilio webhooks base url
    twilioAuthToken: 'xxxxxxxxxxx', // your twilio auth token
  })

  server.route({
    method: 'POST',
    path: '/',
    handler(request, h) {
      // ...
    },
  })

  await server.start()
}

startServer()

Keywords

hapi

FAQs

Package last updated on 26 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.