错误码

更新时间: 2024/03/13 14:40:07

本文介绍使用 NetEase IM SDK(以下简称 NIM SDK)过程中出现的各类错误码及错误信息,您可以参考详细描述排查对应的问题。

通用状态码

code desc 说明
0 unknown error 未知错误
200 success 请求成功

通用错误码

code desc 说明
190001 internal error 内部错误
190002 illegal state 非法状态
191001 misuse 使用姿势错误
191002 cancelled 操作取消
191003 callback failed 回调失败
191004 invalid parameter 参数错误
191005 timeout 请求超时
191006 resource not exist 资源不存在
191007 resource already exist 资源已存在

连接错误

code desc 说明
192001 connect failed 连接错误
192002 connect timeout 连接超时
192003 disconnected 连接断开
192004 protocol timeout 协议超时
192005 protocol send failed 协议发送失败
192006 request failed 请求失败

数据库错误

code message 详细描述
193001 database open failed 数据库打开失败
193002 database upgrade failed 数据库升级失败
193003 database write failed 数据库写入失败
193004 database read failed 数据库读取失败

文件错误

code message 详细描述
194001 file not found 文件找不到
194002 file create failed 文件创建失败
194003 file open failed 文件打开失败
194004 file write failed 文件写入失败
194005 file read failed 文件读取失败
194006 file upload failed 文件上传失败
194007 file download failed 文件下载失败

应用错误

code desc 说明
101301 IM disabled IM 未开通。请至云信控制台开通 IM 服务,开通步骤参见开始使用 IM 产品
101302 service address invalid 服务地址非法
101303 appkey not exist App Key 不存在
101304 bundleid check failed Bundle ID 校验失败。如果在云信控制台应用管理 > App Key管理 > 标识管理选中了进行标识安全验证,当客户端 app 标识(iOS Bundle Identifier / Android Package Name)不在配置的列表中,会返回该错误码。
101305 illegal auth type 非法的鉴权方式

账号错误

code desc 说明
102404 account not exist 用户(云信 IM 账号)不存在
102405 account already exists 用户(云信 IM 账号)已存在
102421 account chat banned 用户被禁言
102422 account banned 用户被禁用
102426 account in block list 用户被拉黑
102434 limit of accounts exceeded 超过最大用户数
102449 account operation need retry 账号请求需要重试
102301 login record not found 找不到设备登录记录
102302 invalid token 无效 Token
102303 robot not allowed 机器人账号不得登录

会话错误

code desc 说明
110301 accounts for conversations not unique 会话所属账号(accountId)不唯一
110302 conversation and account mismatch 会话和账号(accountId)不匹配
110303 conversation stick top limit 会话置顶数量超限,默认支持 100 个会话上限。
110304 conversation belonged group limit 会话所属的会话分组数量超限,默认每个会话最多可属于 5 个分组。
110404 conversation not exist 该会话不存在。
110449 conversation operation need retry 会话请求需要重试。

会话分组错误

code desc 说明
116404 conversation group not exist 该会话分组不存在。
116435 conversation group limit 会话分组数量超限。最多支持创建 50 个会话分组。
116437 conversations in group limit 会话分组中的会话数量超限。每个会话分组最多支持 1000 个会话。

用户资料错误

code desc 说明
103404 user profile not exist 用户资料不存在
103451 user profile hit antispam 用户资料命中反垃圾

好友错误

code desc 说明
104301 peer friend limit exceeded 对方好友数量超限
103451 friend application not exist 好友申请不存在
104404 friend not exist 好友不存在
104405 friend already exist 好友已存在
104429 self friend operation not allowed 不允许对自己进行好友操作
104435 friend accounts limit exceeded 好友数量超限
104449 friend operation rate limit exceeded 好友操作频率超限
104451 friend hit antispam 好友操作命中反垃圾

免打扰错误

code desc 说明
105435 mute list limit exceeded 免打扰用户列表超限
105429 self mute operation not allowed 不允许在设置单聊消息免打扰时传入本人账号( accountId

黑名单错误

code desc 说明
106435 blocklist limit exceeded 黑名单用户数量超限
106429 self blocklist operation not allowed 不允许将本人账号( accountId)加入黑名单

消息错误

code desc 说明
107410 messaging function disabled 该 app 未开启发消息功能
107451 message hit antispam 消息发送命中反垃圾
107404 message not exist 消息不存在
107429 revoke message to self not allowed 不允许撤回发给自己的消息
107439 invalid time range 无效的时间范围
107301 revoke third party message not allowed 不允许撤回第三方业务消息
107302 sending message failed for marking message read failed for too many team members 由于群成员过多导致标记已读失败,消息发送失败
107303 only sender or manager can revoke message 仅允许发送者或管理员撤回消息
107304 rate limit of high-priority messages exceeded 高优消息发送超过频控限制
107305 ack message should be high-priority ACK 消息必须是高优消息
107306 duplicate client message ID 消息客户端 ID 重复
107307 short to long URL failed 短链转长链失败
107308 URL invalid 无效 URL
107309 duration out of range duration 超出范围
107310 get file meta info failed 获取文件 meta 信息失败
107311 audio file size limit exceeded 音频文件大小超限
107312 voice to text timeout 语音转文字超时
107313 voice to text failed 语音转文字失败
107314 revoke message exceeded time limit 撤回消息超过时间限制。默认限制为 2 分钟,可在云信控制台 IM 即时通讯 > 基础功能 > 消息撤回时长进行修改。
107315 revoke specified message not allowed 仅允许发送者或管理员撤回消息
107316 force push list limit exceeded 群消息强推用户列表超过上限
107317 team message receipt rate limit exceeded 群消息已读操作频率超限
107318 snapshot not exist 快照不存在
107319 PIN limit exceeded PIN 消息数量超限
107320 PIN not exist PIN 消息不存在
107321 quick comment limit exceeded 快捷评论数量超限
107322 PIN already exist PIN 消息已存在
107323 rate limit for messaging exceeded 消息操作超过频控
107325 read receipt for p2p messages function disabled 未开启单聊消息已读功能。请联系技术支持。
107326 quick comment function disabled 未开启快捷评论功能。请至云信控制台 IM 即时通讯 > 全局功能 > 消息快捷评论进行开通。
107327 PIN function disabled 未开启消息 PIN 功能。请至云信控制台 IM 即时通讯 > 全局功能 > 会话消息标记进行开通。
107328 delete self message not allowed 不允许删除发送给自己的消息。
107329 %s is not chatbot account 非机器人账号
107330 sender or receiver must sense message 发送方和接收方必须有一方有感知。
107331 read receipt for team messages function disabled 未开启群消息已读功能。请至云信控制台 IM 即时通讯 > 群聊 > 群组已读进行开通。
107332 read receipt record for the team message not found 群消息已读记录未找到。
107333 voice to text function disabled 语音转文字功能未开通。请至云信控制台 IM 即时通讯 > 全局功能 > 语音识别进行开通。
107334 server search function disabled 云端搜索功能未开通。请至云信控制台 IM 即时通讯 > 全局功能 > 全文云端消息检索进行开通。
107335 one-way delete function disabled 单向删除功能未开通。请至云信控制台 IM 即时通讯 > 全局功能 > 单向消息删除进行开通。
111301 resent message not exist 重发消息不存在。

群组错误

code desc 说明
108404 team not exist 该群组不存在。
108406 get online users count disabled 高级群获取在线人数功能未开启。请联系技术支持。
108423 all team members chat banned 群全体成员禁言。
108430 assign team owner manager role not allowed 不允许添加群主为管理员。
108434 extended super team limit 大容量超大群数量超限。默认为 20 个群,可以在云信控制台 IM 即时通讯 > 群聊 > 超大群进行修改。
108435 created team limit 创建的群组数量超过上限。默认为 100 个群/人,可以在云信控制台 IM 即时通讯 > 群聊 > 创建群数量进行修改。
108437 team invitation limit 群组内人数超过上限。高级群默认上限为 200,超大群默认上限为 2000,可以在云信控制台 IM 即时通讯 > 群聊 > 群容量或超大群进行修改。
108451 team hit antispam 群组命中反垃圾。
108449 team operation need retry 群组请求需要重试。
108302 not advanced team 非高级群。
108303 team manager limit exceeded 群组管理员数量超限。
108304 extended super team limit not configured 未配置大容量超大群的数量。
108305 joined team limit exceeded 加入群组数量超过上限。默认为 5000 群/人。
108306 team normal member chat banned 群全体普通成员禁言。
108307 invited account not friend 被邀请者非好友关系。
108308 reject all team applications 拒绝所有入群申请。
108309 create team with more than %s users not allowed 不允许创建超出 %s 人的群。
108310 operator is already team owner 当前操作者已是群主。
108311 super team service disabled 超大群服务未开通。请在云信控制台 IM 即时通讯 > 群聊 > 超大群进行开通。
108313 create extended super team not allowed 不允许创建大容量超大群。
108314 team limit per query exceeded 查询群的数量超限。

群成员错误

code desc 说明
109301 list of chat banned users contains non team members 禁言列表包含非群成员。
109303 list of chat banned users contains the operator 禁言列表包含操作人。
109304 list of chat banned users contains the team owner 禁言列表包含群主。
109305 operation on team manager not allowed 不允许操作管理员。
109306 no team invite permission 没有群邀请权限。
109307 team owner quit not allowed 群主不允许退群。
109308 list of kicked user contains the team owner 群被踢列表包含群主。
109309 invite robot account not allowed 不允许邀请机器人账号进群。
109310 kick operator not allowed 被踢的群成员列表中包含操作者。
109311 team member already exist 群成员已存在。
109312 operation on self not allowed 不允许操作本人,
109313 team invitation or application not exist 群邀请或申请入群记录不存在。
109314 operation on team owner not allowed 不允许操作群主。
109404 team member not exist 群成员不存在。
109424 team member chat banned 群成员被禁言。
109427 team owner operation permission required 仅允许群主操作。
109432 team owner or manager operation permission required 仅允许群主或管理员操作。
109449 team member concurrent operation failed 并发操作群成员失败。
109451 team member hit antispam 群成员操作命中反垃圾。

广播通知错误

code desc 说明
111410 broadcasting notification service disabled 广播通知功能未开启。请在云信控制台 IM 即时通讯 > 全局功能 > 全员广播进行开通。
111404 broadcasting notification not exist 该广播通知不存在。
111451 hit antispam 命中反垃圾。
113309 broadcasting notification hit antispam 广播通知命中反垃圾
113310 broadcasting notification service disabled 广播通知服务未开启

聊天室错误

code desc 说明
113304 failed to get chatroom link 获取有效的聊天室连接地址失败。
113305 IM connection abnormal IM 连接状态异常。
113404 chatroom not exist 聊天室不存在。
113406 chatroom closed 聊天室已关闭。
113409 operation on chatroom repeated 聊天室重复操作。
113410 chatroom service disabled 聊天室服务未开通。请在云信控制台 IM 即时通讯 > 聊天室进行开通。
113423 all chatroom members chat banned 聊天室全体成员禁言。
113451 chatroom info hit antispam 聊天室信息命中反垃圾。
113306 chatroom illegal auth type 非法的聊天室鉴权方式。
113307 identical field values 参数与现有聊天室属性一致,无需更新。
113428 chatroom manager operation permission required 仅允许聊天室管理员操作。
113434 chatroom count limit exceeded 聊天室数量超过限制。聊天室数量上限可以在云信控制台 IM 即时通讯 > 聊天室 > 子功能配置 > 单用户可创建聊天室数进行配置。
113308 notification for joining or leaving chatrooms disabled 聊天室成员进出通知功能未开启。请在云信控制台 IM 即时通讯 > 聊天室 > 子功能配置 > 聊天室用户进出消息系统下发进行开通。
113301 chatroom temporarily chat banned 聊天室被临时禁言。
113302 chatroom tagged members chat banned 聊天室标签成员被禁言。
113303 chat room closing, reopen not allowed 聊天室关闭,不允许重新打开。

聊天室成员错误

code desc 说明
114404 chatroom member not exist 聊天室成员不存在。
114405 chatroom member repeated operation 聊天室成员重复操作。
114421 chatroom member chat banned 聊天室成员禁言。
114426 account in chatroom block list 账号在聊天室黑名单中。
114427 chatroom owner operation permission required 仅允许聊天室所有者操作。
114429 operator in chatroom member operation list 聊天室成员操作列表包含操作者。
114432 chatroom owner or manager operation permission required 仅允许聊天室所有者或管理员操作。
114437 chatroom member limit 聊天室成员数量超限。
114449 chatroom member concurrent operation failed 并发操作聊天室成员失败。
114451 chatroom member info hit antispam 聊天室成员命中反垃圾。
114408 Member: %s was already deleted 聊天室成员已删除。
114301 target account in blocklist or chat banned list of chatroom 目标账号在禁言或黑名单列表中。
114303 anonymous member operation forbidden 匿名成员禁止操作。
114304 Target chatroom member offline 目标成员帐号不在线。

反垃圾错误

code desc 说明
195001 client anti-spam 命中客户端反垃圾
195002 server anti-spam 命中云端反垃圾

全局错误

code desc 说明
201 handshake error 握手错误
202 asymmetric encryption algorithm error 非对称加密算法错误
203 symmetric encryption algorithm error 对称加密算法错误
204 handshake protocol version need fallback 握手协议版本需降级
398 request temporary forbidden 请求被服务器暂时禁止
399 server unit error 服务器单元错误
403 forbidden 没有权限
404 not found 资源不存在
414 parameter error 参数错误
416 rate limit exceeded 频率超限
417 multi login forbidden 多端登录被禁止
449 need retry 请求需要重试
463 callback forbidden 第三方回调被拒绝
500 internal server error 服务器内部错误
503 server busy 服务器繁忙
511 app server unreachable app 服务不可达
514 service unavailable 服务不可用
599 protocol filtered by blackhole rule 协议被黑洞规则过滤
997 appid has no permission to call the protocol appid 没有权限调用该协议
998 unpack error 解包错误
999 pack error 打包错误

服务端错误

code desc 说明
403 request header for authentication missing 缺少鉴权请求头
403 invalid AppKey 非法的 App Key
403 CurTime five minutes greater than server time curtime 大于当前时间 5 分钟以上
403 CurTime five minutes less than server time curtime 小于当前时间 5 分钟以上
403 authentication failed checksum 鉴权失败
403 access forbidden 拒绝访问
400 incorrect request method HTTP 请求方式错误
414 invalid request body 请求体格式不正确
414 invalid path or request parameter 路径参数或者请求参数不合法
此文档是否对你有帮助?
有帮助
去反馈
  • 通用状态码
  • 通用错误码
  • 连接错误
  • 数据库错误
  • 文件错误
  • 应用错误
  • 账号错误
  • 会话错误
  • 会话分组错误
  • 用户资料错误
  • 好友错误
  • 免打扰错误
  • 黑名单错误
  • 消息错误
  • 群组错误
  • 群成员错误
  • 广播通知错误
  • 聊天室错误
  • 聊天室成员错误
  • 反垃圾错误
  • 全局错误
  • 服务端错误