Skip to content

Commit

Permalink
documentation: service sid config (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw authored Sep 28, 2020
1 parent a2aa481 commit ae2e254
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ You are viewing the `3.x` documentation. [Click here](https://github.com/laravel
## Contents

- [Installation](#installation)
- [Setting up your Twilio account](#setting-up-your-twilio-account)
- [Usage](#usage)
- [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
Expand Down Expand Up @@ -45,6 +44,7 @@ TWILIO_ACCOUNT_SID=1234 # always required
TWILIO_FROM=100000000 # optional default from
TWILIO_ALPHA_SENDER=HELLO # optional
TWILIO_DEBUG_TO=23423423423 # Set a number that call calls/messages should be routed to for debugging
TWILIO_SMS_SERVICE_SID=MG0a0aaaaaa00aa00a00a000a00000a00a # Optional but recommended
```

### Advanced configuration
Expand All @@ -62,6 +62,13 @@ exception codes from [the documentation](https://www.twilio.com/docs/api/errors)
If you want to suppress all errors, you can set the option to `['*']`. The errors will not be logged but notification
failed events will still be emitted.

#### Recommended Configuration

Twilio recommends always using a [Messaging Service](https://www.twilio.com/docs/sms/services) because it gives you
access to features like Advanced Opt-Out, Sticky Sender, Scaler, Geomatch, Shortcode Reroute, and Smart Encoding.

Having issues with SMS? Check Twilio's [best practices](https://www.twilio.com/docs/sms/services/services-best-practices).

## Upgrading from 2.x to 3.x

If you're upgrading from version `2.x`, you'll need to make sure that your set environment variables match those above
Expand Down Expand Up @@ -161,6 +168,7 @@ public function routeNotificationForTwilio()

- `from('')`: Accepts a phone to use as the notification sender.
- `content('')`: Accepts a string value for the notification body.
- `messagingServiceSid('')`: Accepts a messaging service SID to handle configuration.

#### TwilioCallMessage

Expand Down
5 changes: 5 additions & 0 deletions config/twilio-notification-channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
'from' => env('TWILIO_FROM'), // optional
'alphanumeric_sender' => env('TWILIO_ALPHA_SENDER'),

/**
* See https://www.twilio.com/docs/sms/services.
*/
'sms_service_sid' => env('TWILIO_SMS_SERVICE_SID'),

/**
* Specify a number where all calls/messages should be routed. This can be used in development/staging environments
* for testing.
Expand Down

0 comments on commit ae2e254

Please sign in to comment.