获取指定帐号信息 (通过标识)

最近更新时间:9/30/2021, 3:27:06 PM作者:andrewren(任豪)

接口描述

接口请求域名:http://sp.{工业环境域名}

接口请求URL:http://sp.{工业环境域名}/iam/api/v1/account/search-by-identifier

接口类型:非OpenAPI

接口请求方式:GET

访问时需要在cookie中携带sp_access_token。

该接口只获取指定帐号信息,仅支持查询CP/普通用户

输入参数

字段名 字段类型 字段描述
Identifier String 账号ID 或 账号昵称

输出参数

参数名称 类型 描述
Code Integer 错误码
Msg String 错误信息
Account Account 账号信息

Account

字段名 字段类型 字段描述
AccountId string 账号ID
NickName string 昵称,用户名
Type int32 账号类型,1:主账户 2:子账户
Role int32 用户角色,0:普通用户 1:CP服务商 10:SP运营商 20:客户经理
Strategy int32 用户策略,0:游客 10:个人认证用户 20:企业管理员 21:企业员工
RegisterType int32 1:邮箱注册 2:子账户 3:微信注册 4:企业微信注册
MasterId int64 主账户AccountId
AuthType int32 认证类型,0:个人认证 1:企业认证
AuthStatus int32 认证状态,0:未认证 1:认证中 2:认证通过 3:认证失败
AccountName string 账户名,主账户登录邮箱, 子账户的创建名
ContactMailStatus int32 联系邮箱的状态,0:未确认 1:确认中 2:已确认
ContactMail string 联系邮箱
ContactMobileStatus int32 联系手机的状态,0:未确认 1:确认中 2:已确认
CountryCode string 国家区号
ContactMobile string 联系手机
WxBindStatus int32 微信的绑定状态,0:未绑定 1:已绑定
WxOpenId string 微信绑定的openId
WxNickName string 微信昵称
MiniProgramBindStatus int32 微信小程序绑定状态,0:未绑定 1:已绑定
WorkWxBindStatus int32 企业微信绑定状态,0:未绑定 1:已绑定
WorkWxCorpId string 企业微信的企业Id
WorkWxUserId string 企业微信的用户Id
MasterIsCp bool 子账号的主账号 是否CP服务商
CorpName string 企业认证的企业名称

示例

示例1 请求例子

输入示例

Cookie: sp_access_token=xxxxx
GET http://sp.{工业环境域名}/iam/api/v1/account/search-by-identifier?Identifier=xxx

输出示例

{
    "Code": 0,
    "Msg": "成功",
    "Account": {
        "AccountId": "526233914818170870",
        "AccountName": "331844xxx@qq.com",
        "RegisterType": 1,
        "AppId": 0,
        "NickName": "331844xxx@qq.com",
        "Type": 1,
        "Role": 1,
        "Strategy": 20,
        "MasterId": "526233914818170870",
        "Status": 2,
        "ContactMailStatus": 2,
        "ContactMail": "331844502@qq.com",
        "ContactMobileStatus": 0,
        "ContactMobile": "1852092xxxx",
        "WxBindStatus": 0,
        "WxOpenId": "",
        "WxNickName": "",
        "AuthType": 1,
        "AuthStatus": 2,
        "AuthId": "526237206298234870",
        "IsAuthMod": 0,
        "ModAuthType": 0,
        "ModAuthId": "0",
        "CorpName": "腾讯无限测试公司",
        "MailBindStatus": 0,
        "WorkWxBindStatus": 0,
        "WorkWxUserId": "",
        "WorkWxCorpId": "",
        "MiniProgramBindStatus": 0,
        "MasterIsCp": false,
        "AuthTime": 1593590896
    },
    "Manager": null
}

错误码

以下仅列出了接口业务逻辑相关的错误码

错误码 描述