Marking One-to-One Messages as Read

Last updated: 2022-01-14 17:03:05

    Feature Description

    This API is used to mark all the messages of a one-to-one conversation as read.

    API Call Description

    Sample request URL


    Request parameters

    The following table only describes the modified parameters when this API is called. For more information on other parameters, please see RESTful API Introduction.

    Parameter Description
    https The request protocol is HTTPS, and the request method is POST.
    xxxxxx The country/region where your SDKAppID is located.
  • China:
  • Singapore:
  • Seoul:
  • Frankfurt:
  • India:
  • v4/openim/admin_set_msg_read Request API
    sdkappid SDKAppID assigned by the IM console when an application is created
    identifier App administrator account. For more information, please see the App Admin section in Login Authentication.
    usersig Signature generated by the app administrator account. For more information on how to generate the signature, please see Generating UserSig.
    random A random 32-bit unsigned integer ranging from 0 to 4294967295
    contenttype Request format. The value is always json.

    Maximum call frequency

    200 calls per second

    Sample request packet

    The administrator specifies that dramon1 marks all the messages of its one-to-one conversation with dramon2 as read.


    Request packet fields

    Field Type Required Description
    Report_Account String Yes UserId of the account for which to mark messages as read
    Peer_Account String Yes UserId of the other account in the one-to-one conversation

    Sample response packet

      "ActionStatus": "OK",
      "ErrorInfo": "",
      "ErrorCode": 0

    Response packet fields

    Field Type Description
    ActionStatus String Request result. OK: successful; FAIL: failed
    ErrorCode Integer Error code. 0: successful; other values: failed
    ErrorInfo String Detailed error information

    Error Codes

    The returned HTTP status code for this API is always 200 unless a network error (such as error 502) occurs. The specific error code and details can be found in the response fields ErrorCode and ErrorInfo respectively.
    For public error codes (60000 to 79999), please see Error Codes.
    The following table describes the error codes specific to this API:

    Error Code Description
    90001 Failed to parse the JSON request packet. Make sure the format of the request is valid.
    90003 The To_Account field is missing in the JSON request packet or the account it specifies does not exist.
    90008 The From_Account field is missing in the JSON request packet or the account it specifies does not exist.

    API Debugging Tool

    Use the RESTful API online debugging tool to debug this API.