{"action":"created","issue":{"url":"https://api.github.com/repos/leancloud/docs/issues/710","labels_url":"https://api.github.com/repos/leancloud/docs/issues/710/labels{/name}","comments_url":"https://api.github.com/repos/leancloud/docs/issues/710/comments","events_url":"https://api.github.com/repos/leancloud/docs/issues/710/events","html_url":"https://github.com/leancloud/docs/issues/710","id":116519175,"number":710,"title":"使用Python脚本进行用户注册，出现[600] 无效的短信签名。错误","user":{"login":"DeanChensj","id":9414763,"avatar_url":"https://avatars.githubusercontent.com/u/9414763?v=3","gravatar_id":"","url":"https://api.github.com/users/DeanChensj","html_url":"https://github.com/DeanChensj","followers_url":"https://api.github.com/users/DeanChensj/followers","following_url":"https://api.github.com/users/DeanChensj/following{/other_user}","gists_url":"https://api.github.com/users/DeanChensj/gists{/gist_id}","starred_url":"https://api.github.com/users/DeanChensj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeanChensj/subscriptions","organizations_url":"https://api.github.com/users/DeanChensj/orgs","repos_url":"https://api.github.com/users/DeanChensj/repos","events_url":"https://api.github.com/users/DeanChensj/events{/privacy}","received_events_url":"https://api.github.com/users/DeanChensj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"aisk","id":699636,"avatar_url":"https://avatars.githubusercontent.com/u/699636?v=3","gravatar_id":"","url":"https://api.github.com/users/aisk","html_url":"https://github.com/aisk","followers_url":"https://api.github.com/users/aisk/followers","following_url":"https://api.github.com/users/aisk/following{/other_user}","gists_url":"https://api.github.com/users/aisk/gists{/gist_id}","starred_url":"https://api.github.com/users/aisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aisk/subscriptions","organizations_url":"https://api.github.com/users/aisk/orgs","repos_url":"https://api.github.com/users/aisk/repos","events_url":"https://api.github.com/users/aisk/events{/privacy}","received_events_url":"https://api.github.com/users/aisk/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-11-12T10:17:56Z","updated_at":"2015-11-13T07:41:26Z","closed_at":"2015-11-12T10:44:27Z","body":"使用的是python的API\r\n注册的过程大致如下，想用脚本随机生成一些假用户。\r\n  user = User()\r\n  user.set(\"username\", username)\r\n  user.set(\"password\", \"123456\")\r\n  user.set(\"mobilePhoneNumber\", username)\r\n  user.sign_up()\r\n报错在sign_up()这一步， 数据库里确实增加了数据，但是注册似乎没有成功，这是为什么呢？"},"comment":{"url":"https://api.github.com/repos/leancloud/docs/issues/comments/156355290","html_url":"https://github.com/leancloud/docs/issues/710#issuecomment-156355290","issue_url":"https://api.github.com/repos/leancloud/docs/issues/710","id":156355290,"user":{"login":"myleslee","id":108758,"avatar_url":"https://avatars.githubusercontent.com/u/108758?v=3","gravatar_id":"","url":"https://api.github.com/users/myleslee","html_url":"https://github.com/myleslee","followers_url":"https://api.github.com/users/myleslee/followers","following_url":"https://api.github.com/users/myleslee/following{/other_user}","gists_url":"https://api.github.com/users/myleslee/gists{/gist_id}","starred_url":"https://api.github.com/users/myleslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleslee/subscriptions","organizations_url":"https://api.github.com/users/myleslee/orgs","repos_url":"https://api.github.com/users/myleslee/repos","events_url":"https://api.github.com/users/myleslee/events{/privacy}","received_events_url":"https://api.github.com/users/myleslee/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T07:41:26Z","updated_at":"2015-11-13T07:41:26Z","body":"@DeanChensj，接上面。\r\n\r\n你的应用名称「crowdsensing」为 12 个字符，超出了 10 个字符，如果此时：\r\n\r\n- **验证注册用户手机号码** 为选中\r\n\r\n这时，系统将默认使用 【crowdsensing】做为签名，因为超限，系统会产生 600 的错误。\r\n\r\n而去掉 `user.set(\"mobilePhoneNumber\", username)` 代码就不会触发短信，所以系统不会再报错，数据得以成功保存。\r\n\r\n`sign_up()` 之后再去保存 mobilePhoneNumber，肯定是可以保存。但请检查一下 `_User` 表中列 `mobilePhoneVerified`，此时应该是 false，因为 600 的错误，验证短信并未成功发送，用户没有输入验证码来确认，mobilePhoneVerified 就不会变为 true。\r\n\r\n`mobilePhoneNumber` 为 11 位数字，格式很好修正。但要想成功接收到验证短信，完成完整的注册流程，就要修复 600 的错误，那根据文档提示，这里有两种选择：\r\n\r\n- **应用名称可以在应用设置里修改。**（&check;）<br/>\r\n  进入 **控制台** > 选择 crowdsensing > **设置** > **基本信息** > **应用名称** 来修正，如 `crowd`。\r\n- **短信自定义模板可以在模板里自定义签名。**<br/>\r\n  在自创建的模板中指定一个合法的签名，如`【crowd】`。<br/>\r\n  但是在 signIn 注册环节，我们不支持调用自定义模板，其他要发短信的场景里可以调用。\r\n\r\n因此目前的解决方案只能修改应用名称，或取消 **验证注册用户手机号码** 选项，不对手机号码进行验证。\r\n\r\n我们将来会在控制台增加选项来让注册环节也可以使用自定义的短信签名。谢谢！"}}