Read This First (Do Not Remove This Section)
Docs: https://docs.newapi.ai/
Usage questions first: https://deepwiki.com/QuantumNous/new-api
Issues about forwarding behavior after enabling pass-through mode are not accepted; pass-through mode forwards requests directly, so please verify upstream behavior yourself.
Technical support requests such as coding plans or reverse-engineering channels are not accepted as issues.
Warning: issues with this template removed, section headings deleted, or content cleared may be closed directly. Repeated abusive submissions may result in a block.
Your current newapi version
v1.0.0-rc.16
Submission Checks
Feature Description
请求为 new-api 添加基于手机号(SMS)的注册与登录功能,作为现有 OAuth/OIDC 登录方式的补充。
具体需求:
- 手机号注册:用户输入手机号 + 短信验证码 + 密码完成注册,无需依赖第三方 OAuth 平台。
- 手机号登录:支持手机号 + 密码 或 手机号 + 短信验证码 两种方式登录。
- 短信验证码发送:接入主流短信服务商(如阿里云、腾讯云、Twilio 等),通过环境变量配置 API Key / Secret / 模板 ID。
- 手机号绑定/换绑:已注册用户可在个人设置中绑定或更换手机号。
- 安全限制:对短信发送接口增加频率限制(如 60 秒间隔、每日上限),防止短信轰炸。
- 国际区号支持:支持选择国家/地区区号(如 +86、+1、+852 等),便于海外用户使用。
建议配置项(环境变量示例):
SMS_PROVIDER:短信服务商(aliyun / tencent / twilio)
SMS_ACCESS_KEY / SMS_SECRET_KEY:服务商密钥
SMS_SIGN_NAME:短信签名
SMS_TEMPLATE_CODE:验证码模板 ID
SMS_CODE_EXPIRY:验证码有效期(默认 300 秒)
SMS_RATE_LIMIT:同一手机号发送间隔(默认 60 秒)
Use Case
- 国内用户友好:当前 new-api 主要支持 Discord、LinuxDO、Telegram、OIDC 等登录方式,对国内普通用户(尤其是不使用上述平台的用户)门槛较高。手机号注册是国内 SaaS 和 API 服务最主流、最便捷的注册方式,能显著降低新用户上手成本。
- 企业/团队私有化部署:在企业内网或私有化部署场景中,员工通常没有统一的 OAuth 身份源,手机号是最直接的身份标识。管理员可通过手机号快速开通账号,便于后续审计和配额管理。
- 减少第三方依赖:部分用户因网络环境或合规原因无法访问 Discord/Telegram 等海外服务,手机号登录提供了完全独立的认证通道,提升系统可用性。
- 与现有系统兼容:该功能可作为可选模块开启,不影响现有 OAuth/OIDC 登录流程,老用户无需任何迁移操作。
Read This First (Do Not Remove This Section)
Docs: https://docs.newapi.ai/
Usage questions first: https://deepwiki.com/QuantumNous/new-api
Issues about forwarding behavior after enabling pass-through mode are not accepted; pass-through mode forwards requests directly, so please verify upstream behavior yourself.
Technical support requests such as coding plans or reverse-engineering channels are not accepted as issues.
Warning: issues with this template removed, section headings deleted, or content cleared may be closed directly. Repeated abusive submissions may result in a block.
Your current newapi version
v1.0.0-rc.16
Submission Checks
Feature Description
请求为 new-api 添加基于手机号(SMS)的注册与登录功能,作为现有 OAuth/OIDC 登录方式的补充。
具体需求:
建议配置项(环境变量示例):
SMS_PROVIDER:短信服务商(aliyun / tencent / twilio)SMS_ACCESS_KEY/SMS_SECRET_KEY:服务商密钥SMS_SIGN_NAME:短信签名SMS_TEMPLATE_CODE:验证码模板 IDSMS_CODE_EXPIRY:验证码有效期(默认 300 秒)SMS_RATE_LIMIT:同一手机号发送间隔(默认 60 秒)Use Case