2020-1-27-coding登录

发布时间 2023-09-17 19:52:12作者: Yecgaa1

layout: post
title: coding登录
categories: coding-post
background_music: '<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=100% height=100 src="//music.163.com/outchain/player?type=2&id=33367343&auto=1&height=50"></iframe>'
tag: coding api

coding登录接口

若频繁使用该接口会导致验证码
目前暂无有效方法解决验证码

接口URL

https://<team-name-name>.coding.net/api/v2/account/login

请求方式

POST

请求 Content-Type

application/x-www-form-urlencoded

请求Body参数

参数 示例值 必填 参数描述
account 13360225300 必填 手机/邮箱账号
password 123321123321212312312312313 必填 密码的SHA1加密序列

成功返回参数

参数 示例值 参数描述
code 0 状态码
data ··· 账号数据(没有发现特别有价值的数据,故不一一罗列)

成功示例数据

{
	"code": 0,
	"data": {
		"tags_str": "",
		"tags": "",
		"job": 0,
		"sex": 1,
		"phone": "13360225300",
		"birthday": "",
		"location": "",
		"company": "",
		"slogan": "",
		"website": "",
		"introduction": "",
		"avatar": "https://coding-net-production-static-ci.codehub.cn/WM-TEXT-AVAT25-hhRyeVzAOcdIIllXCioP.jpg",
		"gravatar": "",
		"lavatar": "https://coding-net-production-static-ci.codehub.cn/WM-TEXT-AVAT25-hhRyeVzAOcdIIllXCioP.jpg",
		"created_at": 156334871001,
		"last_logined_at": 1580096771925,
		"last_activity_at": 1580045413505,
		"global_key": "yskcpB42NA",
		"name": "xtx",
		"name_pinyin": "xtx",
		"updated_at": 1580055961000,
		"path": "/u/yskcpB12NA",
		"status": 1,
		"email": "265682000003@qq.com",
		"is_member": 0,
		"id": 119742,
		"points_left": 0,
		"follows_count": 0,
		"fans_count": 0,
		"tweets_count": 0,
		"phone_country_code": "+86",
		"country": "",
		"followed": false,
		"follow": false,
		"is_phone_validated": true,
		"email_validation": 1,
		"phone_validation": 1,
		"regist_channel_id": 0,
		"twofa_enabled": 0,
		"is_welcomed": false,
		"account_type": 0
	}
}

成功Cookie

参数值 参数描述
eid 登录认证cookie

所有后面的接口都需要这个cookie来认证,有过期时间

还有一个叫XSRF-TOKEN的cookie,它没有认证作用

失败返回参数

参数 示例值 参数描述
code 1046 状态码
msg ··· 错误原因描述

失败示例数据

{
	"code": 1046,
	"msg": {
		"password": "账户密码不匹配"
	}
}