为了账号安全,请及时绑定邮箱和手机立即绑定

profile_email must be one of the user's verified email addresses

在使用patch方法修改imoocdemo账号信息时,为何不能够提交修改邮箱地址。返回报错如标题。不修改邮箱,其他均可正常返回200。

下边是提交更改邮箱错返回信息。

{
    "documentation_url": "https://developer.github.com/v3/users/#update-the-authenticated-user", 
    "message": "Validation Failed", 
    "errors": [
        {
            "field": "profile_email", 
            "message": "profile_email must be one of the user's verified email addresses", 
            "code": "custom", 
            "resource": "User"
        }
    ]
}
{'Content-Length': '59', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'User-Agent': 'python-requests/2.19.1', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic aW1vb2NkZW1vOmltb29jZGVtbzEyMw=='}
{"name": "babyang12231le", "email": "helloworld@imooc.org"}
422
https://api.github.com/user

profile_email必须是用户已验证的电子邮件地址之一  ,这个是不是有设置隐私邮件之类的东西。

正在回答

2 回答

profile_email must be one of the user's verified email addresses 已经指出原因了,应该是本身就不支持这种修改吧,因为github是用邮箱来登录,所以不能轻易修改,需要验证

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Python-走进Requests库
  • 参与学习       38700    人
  • 解答问题       114    个

python类库中,requests是一件利器,想深入了解一起来学吧

进入课程

profile_email must be one of the user's verified email addresses

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号