Skip to content

chadnpc/clihelper.twilio

Repository files navigation

Icon clihelper.twilio

🖂 Twilio client module.

PowerShell Gallery

📦 Installation

# Install from PSGallery
Install-Module clihelper.twilio -Scope CurrentUser

# Import the module
Import-Module clihelper.twilio

$msg = [Twilio]::SendMessage("$env:TWILIO_TO_NUMBER", "+15550001111", "Hello from Twilio!")
"Sent message SID: $($msg.Sid)"

🚀 Features

  • Fluent API: Use the [Twilio] static class for common operations.
  • TwiML Support: Build Voice and Messaging responses with ease.
  • JWT Generation: Create Access Tokens with various grants.
  • Validation: Validate Twilio webhook signatures effortlessly.

Load env vars first:

cp .env.example .env
Read-Env .env | Set-Env

Edit .env with your Twilio credentials. You can get them from your Twilio Console.

🛠️ Developer Info

To test the module locally without installing it:

Import-Module ./clihelper.twilio.psd1
./Test-Module.ps1 -SkipBuildOutput

or test the ./BuildOutput/

./Test-Module.ps1

License

This project is licensed under the MIT License.

Contributors