Skip to main content
GET
/
ping
Ping
curl --request GET \
  --url https://kyc.sbx.moduluslabs.io/ping
"Pong!"
The Ping endpoint is a simple health check that allows you to:
  • Test connectivity to Modulus Labs servers
  • Verify API availability and response time
  • Confirm your network can reach the API endpoints
This endpoint does not require authentication, making it perfect for quick connectivity tests and uptime monitoring.
If you receive Pong!, the API is available and your network connectivity is working!

Use Cases

Connection Test

Verify your application can reach Modulus Labs servers

Health Monitoring

Include in your application’s health check endpoints

CI/CD Testing

Use in automated tests to verify API availability

Uptime Monitoring

Monitor API uptime and response times without authentication overhead

Code Examples

curl https://qrph.sbx.moduluslabs.io/ping

# Successful response:
# Pong!

Monitoring Example

Include the Ping endpoint in your monitoring strategy:
const HEALTH_CHECK_INTERVAL = 60000; // 1 minute

setInterval(async () => {
  try {
    const response = await axios.get(
      'https://qrph.sbx.moduluslabs.io/ping',
      { timeout: 5000 } // 5 second timeout
    );

    if (response.data === 'Pong!') {
      console.log('Modulus Labs API is healthy');
      // Update your monitoring dashboard
    }
  } catch (error) {
    console.error('Modulus Labs API health check failed');
    // Alert your team
    // Log to monitoring service
  }
}, HEALTH_CHECK_INTERVAL);

Best Practices

Always set appropriate timeouts when making ping requests to avoid hanging your application.
{ timeout: 5000 } // 5 seconds
Log health check failures for debugging and monitoring.
console.error('Ping failed:', {
  timestamp: new Date().toISOString(),
  error: error.message,
  statusCode: error.response?.status
});
The ping endpoint is for health checks, not request validation. Don’t call it before every API request.Bad: Call ping before every QR creationGood: Call ping during startup and periodically for monitoring (every 1-5 minutes)

Troubleshooting

Symptom: Request times out without responsePossible Causes:
  • Firewall blocking outbound HTTPS requests
  • Network connectivity issues
  • DNS resolution problems
Solutions:
  • Check firewall rules allow HTTPS (port 443)
  • Test DNS resolution: nslookup qrph.sbx.moduluslabs.io
  • Try from a different network
  • Verify no proxy is blocking the request
Symptom: SSL/TLS certificate validation failsPossible Causes:
  • System time incorrect
  • Missing CA certificates
  • Corporate proxy intercepting SSL
Solutions:
  • Verify system time is correct
  • Update SSL certificates on your system
  • Configure proxy settings if applicable
Symptom: Response is not Pong!Possible Causes:
  • Wrong endpoint URL
  • Proxy or CDN modifying response
  • API maintenance or issues
Solutions:
  • Verify URL is exactly https://qrph.sbx.moduluslabs.io/ping
  • Check for any middleware modifying responses
  • Contact Modulus Labs support if issue persists

Next Steps

Response

API is available and responding

The response is of type string.

Example:

"Pong!"