Friends / List

When the Friends/List API request is invoked in the Ozeki Chat Client, it retrieves crucial information about a user's friends, including their availability status and unique identifiers. By querying this API, the client efficiently obtains the userId, username, public key, and availability of each friend, facilitating seamless communication. This feature streamlines the user experience by providing comprehensive details about friends, enabling quick and informed decisions on whom to engage with based on availability.

Friends list request

Method: POST
URL: ?srv=chatserver&api=chatfriends
Request headers: Content-Type: application/json
Ozeki-Signature: signature
Ozeki-Station: stationId
Ozeki-User: userId
POST data:
{
  "action": "list",
  "clientversioncode": 3,
  "timestamp": "2024-03-08 13:55:47"
}

Friends list response

Response headers Content-Type: application/json
Response data:
{
  "status": "OK",
  "errormessage": "",
  "friends": {
    "d574638619cbff603bf857164c47e850": "Administrator"
  },
  "availabilities": [
    {
      "friendid": "d574638619cbff603bf857164c47e850",
      "friendname": "Administrator",
      "publickey": "MIIBIjA...IDAQAB",
      "availability": "available"
    }
  ]
}

Request parameters

userid: This parameter contains the user id of the user. This field can be calculated by taking the md5 checksum of the user's e-mail address. For example: md5("alice@ozeki.hu") = "aa68d2204cb2bb85f2de3b9aad0d86d7";

timestamp: yyyy-MM-dd hh:mm:ss format, in UTC timezone, it's the client's responsibility to convert it into the local timezone.

More information