mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
3004ae9a63
* feat(connector): add YunPian SMS connector * chore: update README and pnpm lock * chore: update SVG and error messages --------- Co-authored-by: Charles Zhao <charleszhao@silverhand.io>
2.7 KiB
2.7 KiB
Yunpian SMS connector
The official Logto connector for Yunpian SMS service. 中文文档
Table of contents
Get started
Yunpian is a communication service provider offering various services including SMS. The Yunpian SMS Connector is a plugin provided by the Logto team to integrate with Yunpian's SMS service, enabling Logto end-users to register and sign in via SMS verification codes.
Set up SMS service in Yunpian Console
Create a Yunpian account
Visit Yunpian's website to register an account and complete real-name verification.
Get API KEY
- Log in to Yunpian Console
- Go to "Account Settings" -> "Sub-account Management"
- Find and copy the API KEY
Configure SMS templates
- In Yunpian Console, go to "Domestic SMS" -> "Signature Filing"
- Create and submit a signature, wait for carrier approval
- Go to "Domestic SMS" -> "Template Filing" and select "Verification Code"
- Create a verification code template, ensure it includes the
#code#
variable (you can also use "Common Templates" to speed up the approval process) - Wait for template approval
- If you need to send international SMS, repeat the above steps but select "International SMS" -> "Template Filing"
Configure in Logto
- In Logto Console, go to "Connectors"
- Find and click "Yunpian SMS Service"
- Fill in the configuration form:
- API KEY: The API KEY obtained from Yunpian
- SMS templates: Configure templates according to usage, ensure they match exactly with approved templates in Yunpian
Notes
- SMS template content must match exactly with the approved template in Yunpian
- The verification code variable placeholder in Yunpian templates is
#code#
, while in the connector configuration it's{{code}}
- Yunpian automatically adds the default signature based on API KEY, no need to include signature in the template content
- It's recommended to test the configuration before formal use