Network

Ping My IP

0calls
1 credits / call

This is a very convenient shortcut endpoint, want to know the return latency from your network to our server? Just click!

GET
uapis.cn
/api/v1/network/pingmyip

Overview

This endpoint is a combination of /network/myip and /network/ping. It automatically obtains your client's public IP, then Pings this IP from our server and returns latency data. This is very useful for quickly judging the connection quality between your local network and the server.

Response

200 / OK

Ping operation successful! Returns latency statistics to your client IP.

JSON
{
  // Current client's public IP address.
  "client_ip": "117.140.191.159",
  // Whether Ping to current client IP was successfully completed.
  "ping_successful": true,
  // Operation result description. Usually includes average latency information on success.
  "message": "Ping successful, avg latency: 35.43 ms"
}

400 / Bad Request

Unable to obtain client IP.

JSON
{
  "code": "INVALID_STATE",
  "details": {},
  "message": "Could not determine client IP address."
}

404 / Not Found

Ping operation failed. This is likely because your router or firewall blocks external ICMP Ping requests.

JSON
{
  "code": "PING_FAILED",
  "details": {},
  "message": "Ping operation failed. The host may not be reachable or is blocking ICMP requests."
}