Connection Errors

Solutions for API connection errors in API Mapper

Connection Errors

"Connection failed" or "Request timeout"

Symptoms: API Mapper cannot reach the external API.

Possible causes:

  1. Incorrect API URL
  2. API server is down
  3. Your server blocks outgoing requests
  4. Network/firewall issues

Solutions:

WordPress
  1. Verify the URL

    • Test the API URL in your browser
    • Check for typos (especially http vs https)
    • Ensure the URL doesn't have trailing spaces
  2. Check server connectivity

    • Some hosts block outgoing HTTP requests
    • Contact your host to whitelist the API domain
    • Try a different API to test if outgoing requests work
  3. Increase timeout

    • Go to Settings → API Mapper
    • Edit your connection
    • Increase the Timeout value (default: 30 seconds)
  4. Check error logs

    • Enable WP_DEBUG in wp-config.php
    • Check wp-content/debug.log for details

"SSL certificate problem"

Symptoms: Error message mentions SSL, certificate, or HTTPS issues.

Possible causes:

  • API server has an invalid/expired SSL certificate
  • Your server doesn't trust the API's certificate authority
  • Outdated CA certificates on your server

Solutions:

  1. Verify the API's SSL certificate

    • Visit the API URL in your browser
    • Check if the browser shows a security warning
    • If yes, the issue is with the API provider
  2. Update CA certificates

    • Contact your hosting provider
    • Ask them to update the server's CA bundle
  3. Temporary workaround (not recommended for production)

    • Some APIs offer HTTP alternatives
    • Only use if you understand the security implications

"Could not resolve host"

Symptoms: DNS resolution failed for the API domain.

Possible causes:

  • Typo in the domain name
  • DNS server issues
  • Domain doesn't exist

Solutions:

  1. Check the domain spelling

    • Verify the exact API URL from the provider's documentation
    • Common mistakes: api.example.com vs example.com/api
  2. Test DNS resolution

    • Try pinging the domain from your server
    • If it fails, the issue is DNS-related
  3. Contact your host

    • DNS issues are often server-level
    • Your host may need to flush DNS cache

"Connection refused"

Symptoms: The API server actively rejected the connection.

Possible causes:

  • API is down or under maintenance
  • Your IP is blocked
  • Wrong port number
  • Firewall blocking the connection

Solutions:

  1. Check API status

    • Visit the API provider's status page
    • Try accessing the API from a different network
  2. Verify your IP isn't blocked

    • Some APIs block IPs after too many requests
    • Contact the API provider if you suspect a block
  3. Check the port

    • Ensure you're using the correct port (usually 443 for HTTPS)
    • Some APIs use non-standard ports

Was this page helpful?

On this page