Passport 错误码
Passport 错误码
功能说明
如果返回结果中存在 passportError 字段,则表示调用 API 接口失败。例如:
{
"passportError": "PermissionDenied_Guild_MemberNotInGuild",
"message":"成员不在此公会中",
"passportErrorCode": 70302,
"code": 7
}其中的 passportErrorCode 表示错误码,message 表示该错误的具体信息。
错误码列表
1. Passport 错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Passport_PersonaNameEmpty | 搜索其他用户以添加为好友时,未提供角色(Persona)名称或者ID |
| InvalidArgument_Passport_IdDomainIDEmpty | IdDomain ID不能为空 |
| InvalidArgument_Passport_PhoneNumberEmpty | 发送验证码时,未提供用于接收验证码的手机号或者邮箱 |
| InvalidArgument_Passport_RealmIDEmpty | 域ID不能为空 |
| InvalidArgument_Passport_RealNameEmpty | 用于实名认证的真实姓名不能为空 |
| InvalidArgument_Passport_RealNameIDCardInvalid | 无效的身份证号码 |
| InvalidArgument_Passport_TosEmpty | TOS不能为空 |
| InvalidArgument_Passport_UserIDInvalid | 用户(User) ID不能为空 |
| InvalidArgument_Passport_WechatLoginStateEmpty | 未提供Wechat State |
| InvalidArgument_Passport_LoginMethodInvalid | 登录方式暂未支持 |
| InvalidArgument_Passport_TokenInvalid | 无效的Token |
| InvalidArgument_Passport_VerificationCodeInvalid | 验证码不正确 |
| InvalidArgument_Passport_PersonaIdEmpty | 角色(Persona)ID不能为空 |
| InvalidArgument_Passport_FriendInfoEmpty | 未找到好友信息 |
| InvalidArgument_Passport_RealNameVerifyFailed | 实名认证失败 |
| InvalidArgument_Passport_PersonaNameTooLong | 搜索其他用户以添加为好友时,角色(Persona)名称的长度不能超过30 |
| InvalidArgument_Passport_TagIdInvalid | 标签ID无效 |
| InvalidArgument_Passport_TagNameEmpty | 标签名称不能为空 |
| InvalidArgument_Passport_AppleTokenInvalid | Apple用户Token无效 |
| InvalidArgument_Passport_ExternalAppIDInvalid | 外部AppID无效 |
| InvalidArgument_Passport_ExternalUserIDInvalid | 外部UserID无效 |
| InvalidArgument_Passport_ExternalAccessTokenInvalid | 外部AccessToken无效 |
| InvalidArgument_Passport_FriendRequestIDInvalid | 好友请求ID无效 |
| InvalidArgument_Passport_PhoneNumberInvalid | 无效的手机号码 |
| InvalidArgument_Passport_PropertiesLengthExceedLimit | 自定义属性长度超过限制 |
| InvalidArgument_Passport_IllegalDisplayName | 无效的名字 |
| NotFound_Passport_IdDomain | 未找到Id Domain |
| NotFound_Passport_Realm | 未找到域(Realm) |
| NotFound_Passport_User | 未找到用户(User) |
| NotFound_Passport_Persona | 未找到角色(Persona) |
| NotFound_Passport_Friend | 未找到好友 |
| NotFound_Passport_FriendRequest | 未找到好友请求 |
| NotFound_Passport_Blacklist | 未找到拉黑列表 |
| NotFound_Passport_TOS | 未找到TOS |
| NotFound_Passport_Tag | 未找到标签 |
| NotFound_Passport_IdProvider | 未找到Id Provider |
| AlreadyExists_Passport_Blacklist | 已被拉黑 |
| AlreadyExists_Passport_Friend | 已是好友关系 |
| AlreadyExists_Passport_FriendRequest | 已申请过好友,待通过 |
| AlreadyExists_Passport_Persona | 用户(User)在同一个域(Realm)下只能创建一个角色(Persona) |
| AlreadyExists_Passport_PhoneNumber | 手机号码已被其他账号绑定 |
| AlreadyExists_Passport_IdDomain | ID Domain已存在 |
| AlreadyExists_Passport_UserTag | 用户标签已存在 |
| AlreadyExists_Passport_PersonaTag | 角色标签已存在 |
| AlreadyExists_Passport_Tos | 用户协议已存在 |
| AlreadyExists_Passport_Realm | Realm已存在 |
| PermissionDenied_Passport_RealNameVerifyNeeded | 请先完成实名认证 |
| PermissionDenied_Passport_PhoneBindNeeded | 请先绑定手机号码 |
| PermissionDenied_Passport_IdDomainIDMismatch | IdDomainID不一致 |
| PermissionDenied_Passport_PersonaIDMismatch | PersonaID不一致 |
| ResourceExhausted_Passport_PendingFriendRequest | 待通过的好友申请数量已达上限 |
| ResourceExhausted_Passport_SourceFriendCountLimit | 发出好友请求的Persona的好友数量已达上限 |
| ResourceExhausted_Passport_TargetFriendCountLimit | 接受好友请求的Persona的好友数量已达上限 |
| ResourceExhausted_Passport_RealNameVerifyCount | 实名认证试用额度已用完,请使用模拟实名认证或联系我们开通服务 |
| FailedPrecondition_Passport_AlreadyLoggedin | 已登录 |
| FailedPrecondition_Passport_BlockSelf | 不允许拉黑自己 |
| FailedPrecondition_Passport_Blacklisted | 已被拉黑 |
| FailedPrecondition_Passport_NeedAcceptTos | 需要先同意TOS |
| FailedPrecondition_Passport_AddSelfFriend | 不允许加自己为好友 |
| FailedPrecondition_Passport_FriendRequestProcessed | 好友请求已被处理 |
| FailedPrecondition_Passport_InvalidPersonaStatus | 非法的Persona状态 |
| FailedPrecondition_Passport_UserBanned | 用户已被封禁 |
| FailedPrecondition_Passport_PersonaBanned | 角色已被封禁 |
| Unauthenticated_Passport_AuthInfoEmpty | 鉴权失败 |
| Unauthenticated_Passport_InvalidToken | 无效Token,详情请参见具体的错误信息 |
| Unauthenticated_Passport_NoIdDomainID | 鉴权失败: IdDomainID不能为空 |
| Unauthenticated_Passport_NoUserID | 鉴权失败: UserID不能为空 |
| Unauthenticated_Passport_NoPersonaID | 鉴权失败: PersonaID不能为空 |
| Unauthenticated_Passport_NoDeviceID | Device ID不能为空 |
| Unauthenticated_Passport_NoIdProvider | Id Provider不能为空 |
| Unauthenticated_Passport_NoAuthorizationCode | Authorization Code不能为空 |
| Unauthenticated_Passport_NoPhoneNumber | 手机号码不能为空 |
| Unauthenticated_Passport_NoVerifyCode | 验证码不能为空 |
| Unauthenticated_Passport_WrongAuthType | 鉴权失败,错误的鉴权类型 |
| Unauthenticated_Passport_AccessTokenExpired | Access Token已过期 |
| Unauthenticated_Passport_RefreshTokenExpired | Refresh Token已过期 |
| Unauthenticated_Passport_NonceInvalid | 鉴权失败,无效的Nonce |
2. 权利错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Entitlement_NamespaceTypeEmpty | 权利的Namespace和Type不能为空 |
| InvalidArgument_Entitlement_ConsumeParamsInvalid | 无效的消费数量 |
| NotFound_Entitlement_Entitlement | 未找到权利 |
| NotFound_Entitlement_Definition | 未找到权利定义 |
| AlreadyExists_Entitlement_Entitlement | 权利已存在 |
| AlreadyExists_Entitlement_DefinitionSlug | 权利定义的Slug已存在 |
| ResourceExhausted_Entitlement_ConsumeCountLimit | 没有足够的剩余消费次数 |
| FailedPrecondition_Entitlement_StatusInvalidForConsume | 只能消费生效状态的权利 |
3. 公会错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Guild_GuidIDInvalid | 无效的公会ID |
| InvalidArgument_Guild_GuildNameAlreadyExist | 公会名称已存在 |
| InvalidArgument_Guild_GuildNameEmpty | 公会名称不能为空 |
| InvalidArgument_Guild_AnnouncementLengthExceedLimit | 公会公告超出长度限制 |
| NotFound_Guild_Guild | 未找到公会 |
| NotFound_Guild_GuildRole | 未找到请求的目标公会成员权限 |
| NotFound_Guild_GuildMember | 未找到公会成员 |
| NotFound_Guild_GuildRequest | 未找到加入公会请求 |
| PermissionDenied_Guild_RoleNoPermission | 成员等级不足,无操作权限 |
| PermissionDenied_Guild_MemberNotInGuild | 成员不在此公会中 |
| PermissionDenied_Guild_RequestNotInGuild | 加入公会申请不属于此公会 |
| FailedPrecondition_Guild_AlreadyInGuild | 成员已在公会中,无法创建/加入其他公会 |
| FailedPrecondition_Guild_GuildRoleFull | 请求的目标公会成员权限等级人数已达上限 |
| FailedPrecondition_Guild_GuildFull | 公会成员人数已达上限 |
| FailedPrecondition_Guild_RequestAlreadyProcessed | 加入公会申请已被处理 |
| FailedPrecondition_Guild_StillInCoolDownTime | 玩家离开上一个公会后仍在冷却时间内,无法创建/加入其他公会 |
| FailedPrecondition_Passport_StillInCoolDownTime | 玩家修改用户名/头像后仍在冷却时间内,无法再次修改用户名/头像 |
4. 排行榜错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Leaderboard_MemberIDEmpty | 成员ID不能为空 |
| InvalidArgument_Leaderboard_ScoreInvalid | 成绩不能为空且不能为0 |
| InvalidArgument_Leaderboard_LeaderboardIDInvalid | 排行榜ID无效 |
| InvalidArgument_Leaderboard_TierInvalid | 查询排行榜成绩时,查询的tierName不在该排行榜的配置下 |
| InvalidArgument_Leaderboard_RangeInvalid | 查询的前后排名范围不能大于100 |
| InvalidArgument_Leaderboard_SlugNameInvalid | 排行榜slugName不能为空 |
| InvalidArgument_Leaderboard_VersionIDInvalid | 排行榜版本ID无效 |
| InvalidArgument_Leaderboard_RealmIDEmpty | 排行榜不跨域,查询或更新排行榜相关信息或成绩时,域ID不可为空 |
| InvalidArgument_Leaderboard_UploadScoresInvalid | 批量上传成员成绩时,成绩列表不能为空 |
| InvalidArgument_Leaderboard_ExceedUploadQuantityLimit | 批量上传成员成绩时,超过最大可更新数量限制 |
| InvalidArgument_Leaderboard_MemberTypeInvalid | 排行榜排行目标不匹配 |
| NotFound_Leaderboard_Leaderboard | 未找到排行榜 |
| NotFound_Leaderboard_LeaderboardVersion | 未找到排行榜版本 |
| FailedPrecondition_Leaderboard_PersonaBanned | 玩家已被禁止更新成绩 |
| FailedPrecondition_Leaderboard_NotEffective | 排行榜此时不在可更新时间段内 |
5. 礼包错误码
| 错误码 | 说明 |
|---|---|
| NotFound_Token_TokenClass | 未找到礼包活动 |
| NotFound_Token_TokenInstance | 未找到礼包码 |
| AlreadyExists_Token_TokenCode | 礼包码已存在 |
| ResourceExhausted_Token_GeneralTokenRedeemed | 通用码已被兑换 |
| ResourceExhausted_Token_UniqueTokenLimit | 礼包码兑换次数达到上限 |
| ResourceExhausted_Token_UniqueTokenRedeemed | 唯一码已被兑换 |
| FailedPrecondition_Token_TokenNotReleased | 礼包活动未发布 |
| FailedPrecondition_Token_TokenExpired | 礼包活动已过期 |
| FailedPrecondition_Token_TokenPending | 礼包活动未开始 |
| FailedPrecondition_Token_ScopeNoAccess | Scope不在限定兑换范围内 |
6. 经济系统错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Economy_ResourceSlugNameInvalid | 资源唯一标识slug无效 |
| InvalidArgument_Economy_ProductSlugNameInvalid | 商品唯一标识slug无效 |
| InvalidArgument_Economy_CategorySlugNameInvalid | 商品目录唯一标识slug无效 |
| InvalidArgument_Economy_LackOfResources | 资源不足 |
| InvalidArgument_Economy_ResourceExceedLimit | 资源超过上限 |
| InvalidArgument_Economy_InventoryItemIdInvalid | 背包资源ID无效 |
| InvalidArgument_Economy_InventoryItemCustomDataInvalid | 背包资源自定义属性无效 |
| InvalidArgument_Economy_VirtualPurchaseQuantityInvalid | 虚拟购买数量不可为0 |
| NotFound_Economy_Resource | 未找到资源 |
| NotFound_Economy_Product | 未找到商品 |
| NotFound_Economy_Category | 未找到商品目录 |
| NotFound_Economy_InventoryItem | 未找到背包资源 |
| NotFound_Economy_PaymentTransaction | 未找到支付订单 |
| FailedPrecondition_Economy_ResourceInUse | 资源已被使用 |
| FailedPrecondition_Economy_ProductPublished | 商品已被发布 |
| FailedPrecondition_Economy_CategoryInUse | 商品目录已被使用(原文“商品已被使用”疑为笔误,结合错误码前缀修正) |
| FailedPrecondition_Economy_ProductNotPurchasable | 商品不可购买 |
| FailedPrecondition_Economy_LackOfResources | 资源不足 |
| FailedPrecondition_Economy_ResourceExceedLimit | 资源超过上限 |
| FailedPrecondition_Economy_UnsupportedResourceType | 不支持此资源类型 |
| FailedPrecondition_Economy_PaymentCreated | 待支付订单已建立 |
| FailedPrecondition_Economy_PaymentAmountChanged | 订单金额不一致 |
7. 邮件错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Inbox_RequestStartInvalid | 请求的起始位置超出收件箱容量 |
| NotFound_Inbox_Template | 未找到邮件模板 |
| NotFound_Inbox_Record | 未找到邮件发送记录 |
| NotFound_Inbox_Message | 未找到邮件 |
| AlreadyExists_Inbox_TemplateSlug | 邮件模板的Slug已存在 |
| FailedPrecondition_Inbox_MessageAlreadyRead | 邮件已读 |
| FailedPrecondition_Inbox_MessageAlreadyConsumed | 邮件已领取 |
| FailedPrecondition_Inbox_MessageNotCompleted | 邮件未完成 |
8. 成就错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Achievement_AchievementMetaSlugInvalid | 成就配置唯一标识slug无效 |
| InvalidArgument_Achievement_ActionInvalid | 无效的成就值修改方式,需为Increase(增加)、Reduce(减少)、Reset(重置)、Accumulate(累积) |
| NotFound_Achievement_AchievementMeta | 未找到成就配置 |
| NotFound_Achievement_PersonaAchievement | 未找到玩家成就 |
| FailedPrecondition_Achievement_AchievementNotAchieved | 玩家未达成成就 |
| FailedPrecondition_Achievement_AlreadyRedeemed | 玩家已兑换成就奖励 |
9. 公告错误码
| 错误码 | 说明 |
|---|---|
| NotFound_Billboard_Billboard | 未找到公告 |
| FailedPrecondition_Billboard_BillboardNotPublished | 公告未发布 |
| FailedPrecondition_Billboard_BillboardAlreadyExpired | 公告已过期 |
10. 战令错误码
| 错误码 | 说明 |
|---|---|
| NotFound_BattlePass_BattlePass | 未找到战令 |
| NotFound_BattlePass_BattlePassSlot | 未找到奖励槽 |
| NotFound_BattlePass_PersonaBattlePass | 未找到角色战令 |
| NotFound_BattlePass_PersonaBattlePassSlot | 未找到角色奖励槽 |
| ResourceExhausted_BattlePass_PersonaBattlePassDailyLimit | 角色战令本日积分已达到上限 |
| ResourceExhausted_BattlePass_PersonaBattlePassWeeklyLimit | 角色战令本周积分已达到上限 |
| ResourceExhausted_BattlePass_PersonaBattlePassMaxLevel | 角色战令已达到最大等级 |
| ResourceExhausted_BattlePass_PersonaBattlePassNoRewards | 没有可领取的奖励 |
| FailedPrecondition_BattlePass_BattlePassNotPublished | 战令未发布 |
| FailedPrecondition_BattlePass_BattlePassNotActive | 战令不处于生效状态 |
| FailedPrecondition_BattlePass_PersonaBattlePassSlotActivated | 角色奖励槽已解锁 |
| FailedPrecondition_BattlePass_PersonaBattlePassLevelNotReached | 目标等级未达到 |
| FailedPrecondition_BattlePass_PersonaBattlePassSlotInactive | 角色奖励槽未解锁 |
11. 任务错误码
| 错误码 | 说明 |
|---|---|
| InvalidArgument_Quest_QuestItemSlugInvalid | 任务唯一标识slug无效 |
| InvalidArgument_Quest_UpdateQuestItemActionInvalid | 无效的修改方式,需为Increase(增加)、Reduce(减少)、Reset(重置)、Accumulate(累积) |
| NotFound_Quest_Quest | 未找到任务集 |
| NotFound_Quest_QuestItem | 未找到任务 |
| FailedPrecondition_Quest_RewardsAlreadyRedeemed | 玩家已兑换任务完成奖励 |
| FailedPrecondition_Quest_QuestItemNotCompleted | 玩家任务还未完成 |