| 项目 | 说明 |
|---|---|
| 接口名称 | 获取企业二维码 |
| 接口路径 | /console/commonAuth/login/scanLogin/getQrcode |
| 请求方式 | POST |
| Content-Type | application/json |
| 鉴权方式 | 请求头携带 secretKey(密钥)和 sign(MD5签名),通过 @AuthAndSignCheck 校验 |
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| areaCode | String | 是 | 区编码。四川传值 5100,青岛传值 3702 |
| nsrsbh | String | 否 | 纳税人识别号 |
| areaCode | areaName |
|---|---|
| 1100 | 北京 |
| 1200 | 天津 |
| 1300 | 河北 |
| 1400 | 山西 |
| 1500 | 内蒙古 |
| 2100 | 辽宁 |
| 2102 | 大连 |
| 2200 | 吉林 |
| 2300 | 黑龙江 |
| 3100 | 上海 |
| 3200 | 江苏 |
| 3300 | 浙江 |
| 3302 | 宁波 |
| 3400 | 安徽 |
| 3500 | 福建 |
| 3600 | 江西 |
| 3700 | 山东 |
| 3702 | 青岛 |
| 4100 | 河南 |
| 4200 | 湖北 |
| 4300 | 湖南 |
| 4400 | 广东 |
| 4403 | 深圳 |
| 4500 | 广西 |
| 4600 | 海南 |
| 5000 | 重庆 |
| 5100 | 四川 |
| 5200 | 贵州 |
| 5300 | 云南 |
| 5400 | 西藏 |
| 6100 | 陕西 |
| 6200 | 甘肃 |
| 6300 | 青海 |
| 6400 | 宁夏 |
| 6500 | 新疆 |
{
"areaCode": "5100",
"nsrsbh": "91510000MA6CXXXXX"
}| 参数名 | 类型 | 说明 |
|---|---|---|
| code | String | 返回码,成功为 2000,失败为 9999 |
| message | String | 返回信息描述 |
| success | Boolean | 是否成功 |
| reqId | String | 请求唯一ID |
| data | Object | 返回数据 |
| └ qrcodeId | String | 二维码UUID |
| └ qrcode | String | 二维码内容字符串(用于生成二维码图片) |
| └ taskId | String | 任务ID |
| └ expireTime | Integer | 二维码有效秒数 |
{
"code": "2000",
"message": "成功",
"success": true,
"reqId": null,
"data": {
"qrcodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"qrcode": "https://etax.sichuan.chinatax.gov.cn/scan/xxxxx",
"taskId": "TASK20260716001",
"expireTime": 300
}
}{
"code": "9999",
"message": "获取二维码失败:xxx",
"success": false,
"reqId": null,
"data": null
}| 项目 | 说明 |
|---|---|
| 接口名称 | 扫码登录 |
| 接口路径 | /console/commonAuth/login/scanLogin/qrcodeLogin |
| 请求方式 | POST |
| Content-Type | application/json |
| 鉴权方式 | 请求头携带 secretKey(密钥)和 sign(MD5签名),通过 @AuthAndSignCheck 校验 |
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| taskId | String | 是 | 任务ID(由获取二维码接口返回) |
| qrcodeId | String | 是 | 二维码UUID(由获取二维码接口返回) |
| sflx | String | 否 | 身份类型 |
| type | String | 否 | 登录cookie类型,默认值 1,2,3 |
{
"taskId": "TASK20260716001",
"qrcodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"sflx": "1",
"type": "1,2,3"
}| 参数名 | 类型 | 说明 |
|---|---|---|
| code | String | 返回码,成功为 2000,失败为 9999 |
| message | String | 返回信息描述 |
| success | Boolean | 是否成功 |
| reqId | String | 请求唯一ID |
| data | Object | 返回数据 |
| └ accountId | String | 账户ID |
| └ areaCode | String | 地区编码 |
| └ nsrsbh | String | 纳税人识别号 |
| └ nsrsbhName | String | 登录税局成功的纳税人名称 |
| └ individualId | String | 自然人唯一标识 |
| └ dppt | String | 电子税务局cookie(dppt) |
| └ etax | String | 电子税务局cookie(etax) |
| └ tpass | String | tpass cookie |
{
"code": "2000",
"message": "成功",
"success": true,
"reqId": null,
"data": {
"accountId": "ACC001",
"areaCode": "5100",
"nsrsbh": "91510000MA6CXXXXX",
"nsrsbhName": "成都XX科技有限公司",
"individualId": "IND20260716001",
"dppt": "dppt_cookie_value_xxx",
"etax": "etax_cookie_value_xxx",
"tpass": "tpass_cookie_value_xxx"
}
}{
"code": "9999",
"message": "扫码登录失败:xxx",
"success": false,
"reqId": null,
"data": null
}| code | 说明 |
|---|---|
| 2000 | 成功 |
| 9999 | 失败(具体原因见 message 字段) |
qrcodeId、taskId 和二维码内容taskId 和 qrcodeId,获取登录结果(含cookie信息)