0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

docs(connector): fix twilio readme according to bug bash (#1518)

This commit is contained in:
Darcy Ye 2022-07-12 12:43:46 +08:00 committed by GitHub
parent 96646fc449
commit 2e0db1ee8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,12 +10,16 @@ Create a new account on [Twilio](https://www.twilio.com). (Jump to the next step
Go to the [Twilio console page](https://console.twilio.com/) and sign in with your Twilio account.
Purchase a phone number under _Phone Numbers_ -> _Manage_ -> **_Buy a number_**.
Purchase a phone number under "Phone Numbers" -> "Manage" -> "Buy a number".
Once we have a valid number claimed, nav to the _Messaging_ -> **_Services_**. Create a new Message Service by clicking on the button.
> **Tip**
>
> Sometimes you may encounter the situation that SMS service is not supported in specific countries or areas. Pick a number from other regions to bypass.
Give a friendly service name and choose **_Notify my users_** as our service purpose.
Following the next step, choose `Phone Number` as _Sender Type_, and link the phone number we just claimed to this service.
Once we have a valid number claimed, nav to the "Messaging" -> "Services". Create a new Message Service by clicking on the button.
Give a friendly service name and choose _Notify my users_ as our service purpose.
Following the next step, choose `Phone Number` as _Sender Type_, and add the phone number we just claimed to this service as a sender.
> **Note**
>
@ -25,9 +29,9 @@ Following the next step, choose `Phone Number` as _Sender Type_, and link the ph
We will need the API credentials to make the connector work. Let's begin from the [Twilio console page](https://console.twilio.com/).
Click on the _Account_ menu in the top-right corner, then go to the _API keys & tokens_ page to get your `Account SID` and `Auth token`.
Click on the "Account" menu in the top-right corner, then go to the "API keys & tokens" page to get your `Account SID` and `Auth token`.
Back to _Messaging_ -> _Services_ settings page starting from the sidebar, and find the `Sid` of your service.
Back to "Messaging" -> "Services" settings page starting from the sidebar, and find the `Sid` of your service.
## Compose the connector JSON
@ -62,6 +66,11 @@ Here is an example of Twilio SMS connector config JSON.
}
```
### Test Twilio SMS connector
You can enter a phone number and click on "Send" to see whether the settings can work before "Save and Done".
That's it. Don't forget to [Enable connector in sign-in experience](https://docs.logto.io/docs/tutorials/get-started/enable-passcode-sign-in/#enable-connector-in-sign-in-experience).
### Config types
@ -77,3 +86,6 @@ Here is an example of Twilio SMS connector config JSON.
| content | string | N/A |
| usageType | enum string | 'Register' \| 'SignIn' \| 'Test' |
## Reference
- [Twilio - Error and Warning Dictionary](https://www.twilio.com/docs/api/errors)