Platform API
Get server time
Use this read-only endpoint to get the current OpenIM message server time. It is useful for send-time calibration, historical message migration, and cross-system log correlation.
HTTP request
POST {API_ADDRESS}/msg/get_server_timeRequest example
curl --request POST "${API_ADDRESS}/msg/get_server_time" \
--header "Content-Type: application/json; charset=utf-8" \
--header "operationID: ${OPERATION_ID}" \
--header "token: ${ADMIN_TOKEN}" \
--data-raw '{}'Request body
Send an empty JSON object: {}.
Response
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {"serverTime": 1719800000000}
}data.serverTime is the current server time as a Unix timestamp in milliseconds. See Error codes for failures.
Related pages
Was this page helpful?