Skip to main content

App Server APIs for client applications, including registration and sign-in, group creation, and friend management.

For communication security, the APIs authenticate requests with custom shared headers.

Format

https://$api/$version/$command
ParameterNameDescription
$apiAPI domainAvailable after deploying the service in a private cloud.
$versionVersionAPI version.
$commandCommandSpecific API endpoint.
Request headersRequiredDescriptionNotes
appkeyYesUnique application identifier.
AuthorizationYesObtained from the response after successful sign-in.

Error code reference

Notes:

  • Business APIs usually return HTTP 200. Use code in the response body to determine success or failure.
  • The following error codes may be returned by public APIs. Their meanings and typical triggers are derived from server source code (apis/services/commons/errs).
codeConstantMeaningTypical trigger (derived from source)
0IMErrorCode_SUCCESSSuccessThe request was processed successfully.
1IMErrorCode_PBILLEGALPB parsing failed (internal error code).Internal use; no direct HTTP API return path is currently identified.
2IMErrorCode_DEFAULTDefault errorGeneric fallback error; no explicit return path is currently identified, and APP_DEFAULT is used in more cases.
17000IMErrorCode_APP_DEFAULTApplication default errorGeneric internal fallback error, commonly for database access errors and QR-code generation or query errors.
17001IMErrorCode_APP_APPKEY_REQUIREDMissing appkeyThe request header does not include appkey (apis/validate.go).
17002IMErrorCode_APP_NOT_EXISTEDApplication does not exist or is not configuredThe application for appkey does not exist, or the server cannot obtain an IM SDK instance (for example, for sign-in, SMS, email, or QR-code APIs).
17003IMErrorCode_APP_REQ_BODY_ILLEGALInvalid request body or parametersJSON parsing failed, a required field is missing, or a parameter format is invalid (for example, account does not match ^[a-zA-Z0-9]{6,20}$ during registration).
17004IMErrorCode_APP_INTERNAL_TIMEOUTInternal service timeout or invocation failureThe server failed or timed out when calling an external dependency such as IM Server (for example, registering with IM Server during sign-in to obtain im_token).
17005IMErrorCode_APP_NOT_LOGINNot signed in or authentication failedAn authenticated API is missing Authorization, token parsing or validation failed (apis/validate.go), or user creation failed during an SMS or email sign-in flow.
17006IMErrorCode_APP_CONTINUEContinue polling / incompleteQR-code sign-in: the QR code has not been confirmed (login.go checks whether its state is Default).
17007IMErrorCode_APP_QRCODE_EXPIREDQR code expiredThe QR code was created more than 10 minutes ago (login.go).
17008IMErrorCode_APP_SMS_SEND_FAILEDVerification code delivery failedSMS or email verification-code delivery failed, or saving the code record failed (services/smsservice.go, services/mailservice.go, and others).
17009IMErrorCode_APP_SMS_CODE_EXPIREDVerification code invalid or expiredThe verification code does not exist, validation failed, or it exceeded the five-minute validity period (used by both SMS and email).
17010IMErrorCode_APP_TRANS_NOTRANSENGINETranslation engine is not configuredA translation API was called without a configured translation engine (services/transservice.go).
17011IMErrorCode_APP_USER_EXISTEDUser already existsA write to the user table conflicted during registration or account setup (for example, the account is already in use).
17012IMErrorCode_APP_USER_NOT_EXISTUser does not existNo user was found by account, phone number, email address, or user ID (for example, during account-password sign-in, password changes, or confirmed QR-code sign-in).
17013IMErrorCode_APP_LOGIN_ERR_PASSIncorrect passwordPassword validation failed (the server compares SHA1(password) with database LoginPass).
17014IMErrorCode_APP_PHONE_EXISTEDPhone number already existsThe phone number is already in use during phone binding or setup (services/userservice.go).
17015IMErrorCode_APP_EMAIL_EXISTEmail address already existsThe email address is already in use during email binding or setup (services/userservice.go).
17016IMErrorCode_APP_SensitiveContains sensitive contentText such as a user nickname or group name contains sensitive words (services/userservice.go, services/groupservice.go).
17100IMErrorCode_APP_FRIEND_DEFAULTFriend default errorReserved; no explicit return path is currently identified.
17101IMErrorCode_APP_FRIEND_APPLY_DECLINEThe other party declined the friend request.The other party’s friend verification setting declines requests (services/friendservice.go).
17102IMErrorCode_APP_FRIEND_APPLY_REPEATEDRepeated friend requestReserved; no explicit return path is currently identified.
17103IMErrorCode_APP_FRIEND_CONFIRM_EXPIREDFriend confirmation expiredReserved; no explicit return path is currently identified.
17200IMErrorCode_APP_GROUP_DEFAULTGroup default errorGeneric group fallback error, for example when a non-owner tries to dissolve a group or a query fails (services/groupservice.go).
17201IMErrorCode_APP_GROUP_MEMBEREXISTEDGroup member already existsThe applicant is already a group member (services/groupservice.go).
17202IMErrorCode_APP_GROUP_NORIGHTNo permission for group operationsInsufficient permissions, for example when validation fails in message or group-management logic (services/messageservice.go, and others).
17300IMErrorCode_APP_ASSISTANT_PROMPT_DBERRORAssistant prompt DB errorReserved; no explicit return path is currently identified.
17401IMErrorCode_APP_FILE_NOOSSObject storage is not configuredFile upload credentials: OSS, Minio, S3, Qiniu, or other storage is not configured (services/fileservice.go).
17402IMErrorCode_APP_FILE_SIGNERRSignature generation failedFile upload credentials: generating a presigned URL or signature failed (services/fileservice.go).
17500IMErrorCode_APP_POST_DEFAULTMoment default errorGeneric fallback error for Moment, reaction, and related features (posts/services/reactionservice.go, and others).
17501IMErrorCode_APP_POST_NOTEXISTEDMoment does not existThe Moment does not exist during an update, comment, reaction, or related operation (posts/services/postservice.go, postcommentservice.go).
17502IMErrorCode_APP_POST_NORIGHTNo permission for Moment operationsThe caller is not the author or lacks permission during an update, comment, reaction, or related operation (posts/services/postservice.go, postcommentservice.go).