Skip to content

Commit ae2e254

Browse files
authored
documentation: service sid config (#108)
1 parent a2aa481 commit ae2e254

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ You are viewing the `3.x` documentation. [Click here](https://github.com/laravel
1515
## Contents
1616

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

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

65+
#### Recommended Configuration
66+
67+
Twilio recommends always using a [Messaging Service](https://www.twilio.com/docs/sms/services) because it gives you
68+
access to features like Advanced Opt-Out, Sticky Sender, Scaler, Geomatch, Shortcode Reroute, and Smart Encoding.
69+
70+
Having issues with SMS? Check Twilio's [best practices](https://www.twilio.com/docs/sms/services/services-best-practices).
71+
6572
## Upgrading from 2.x to 3.x
6673

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

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

165173
#### TwilioCallMessage
166174

config/twilio-notification-channel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
'from' => env('TWILIO_FROM'), // optional
1010
'alphanumeric_sender' => env('TWILIO_ALPHA_SENDER'),
1111

12+
/**
13+
* See https://www.twilio.com/docs/sms/services.
14+
*/
15+
'sms_service_sid' => env('TWILIO_SMS_SERVICE_SID'),
16+
1217
/**
1318
* Specify a number where all calls/messages should be routed. This can be used in development/staging environments
1419
* for testing.

0 commit comments

Comments
 (0)