Documentation · Getting Started

Connection Test

This guide explains how to use the API Connection Test built into the ADP Car Market Hub plugin to verify that the WordPress site can authenticate against the AutoScout24 API and reach the listings of the configured dealer account.

The connection test is the recommended last step after configuring credentials and before any import is triggered.

When to use this document

Use this document if you are:

  • Validating a fresh installation immediately after configuring API credentials.
  • Diagnosing an import that previously worked and has started failing.
  • Verifying that a production deployment is reachable after a server migration, certificate change or firewall update.
  • Confirming that rotated credentials (new Client Secret) are accepted by the API.
  • Performing routine pre-go-live checks (see Go Live Checklist).

The connection test is intentionally lightweight: it issues one small listing request for the first configured Seller ID and reports the result. It does not import any vehicles and does not modify any data.

Why the connection test matters

The connection test is the single fastest way to confirm three things at once:

  1. The plugin can reach the configured API host (DNS resolution, network route, firewall, SSL handshake).
  2. The plugin can obtain a valid access token using the configured Client ID and Client Secret against the token endpoint derived from the API Base URL.
  3. The configured Client ID/Secret is authorised for the first configured Seller ID and the API returns listings data in the expected shape.

A full import that fails after several minutes is much harder to diagnose than a connection test that fails immediately. Always run the connection test first.

Before you start

Confirm the following before opening the test:

  • The plugin is installed and activated (Installation Guide).
  • The credentials in Car Market Hub → Settings are filled in and saved (API Credentials Setup):
  • API Base URL
  • Seller ID (at least one)
  • Client ID
  • Client Secret
  • The hosting environment allows outbound HTTPS to the configured API host. Network and SSL prerequisites are documented in API, Network and SSL Requirements.
  • You have administrator access to the WordPress site, so you can open Car Market Hub → Tools.

Step by step instructions

  1. Sign in to WordPress as an administrator.
  2. Open Car Market Hub → Tools.
  3. Locate the API Connection Test card.
  4. Click Test Connection.
  5. Wait for the page to reload. The plugin performs a real request to the API and reports the outcome as an admin notice at the top of the page.
  6. Read the notice carefully. The exact text reflects the actual result of the request, including any error message returned by the API or by the HTTP layer.
  7. If the test succeeds, continue with the next step in your setup or operations workflow.
  8. If the test fails, follow the Troubleshooting section below before re-running the test.

You can re-run the connection test as often as you like; it does not modify any data.

Interpreting the result

Successful result

A successful result means that:

  • The plugin obtained a valid OAuth access token from the token endpoint derived from the API Base URL.
  • The plugin successfully called the listings endpoint for the first configured Seller ID.
  • The API returned a response in the expected shape.

After a successful result, you can safely proceed with a dry run, a manual import, or enable automatic scheduling.

A successful test does not by itself guarantee that:

  • Every configured Seller ID is authorised — the test only validates the first one. If multiple Seller IDs are configured, run a dry run from Tools to confirm each seller returns data.
  • The full catalogue will import without errors — large catalogues can still hit timeouts, image-host issues or rate limits during long-running operations. Use the Batch-Wizard and review the logs.

Failed result

A failed result means that the plugin reached one of the following situations:

  • No Seller ID is configured in Settings.
  • The HTTP request to the API failed (network error, DNS, SSL, timeout, blocked outbound traffic).
  • The API responded with an error (authentication failure, authorisation failure, server-side error, unexpected payload).

The failure notice surfaces the underlying error message returned by the HTTP layer or the API. Do not ignore this text — it is the most important diagnostic clue.

If a failure occurs, do not enable automatic imports until the connection test succeeds again.

What to check after a failed result

Step through the checks below in order. Most failed connection tests are caused by one of the first three items.

  1. Settings completeness. Open Settings and confirm that the API Base URL, Seller ID, Client ID and Client Secret are all populated. A missing Seller ID produces a specific "no Seller ID configured" message.
  2. Credential correctness. Re-check the credentials against the source you received them from. Look for hidden whitespace, smart quotes, mistyped characters and a Client ID/Secret pair that do not match. See API Credentials Setup.
  3. API Base URL. Confirm the URL is the one the API provider expects, includes https://, and matches the environment the credentials were issued for.
  4. Token cache. If you recently rotated credentials, the plugin may still be using a cached token. Clear the token cache from Car Market Hub → Tools and run the test again.
  5. Outbound HTTPS. Confirm with your hosting provider that the server is permitted to make outbound HTTPS requests to the configured API host. See API, Network and SSL Requirements.
  6. SSL trust. A "certificate verify failed" or similar error means the server's CA bundle does not trust the API host's certificate chain. Update the OS / PHP CA bundle through your hosting provider.
  7. DNS. A "could not resolve host" error means the server cannot resolve the API host name. Resolve at the OS / DNS level.
  8. Logs. Open Car Market Hub → Logs and look at the most recent entries. The plugin logs token requests, listing requests and errors. The log usually contains additional detail (HTTP status code, request target) that explains the failure.
  9. Seller authorisation. If the test succeeds for one credential set but fails specifically for a particular Seller ID during a dry run or import, the credentials are likely not authorised for that seller. Contact the API provider to confirm.

Common causes of a failed connection test

CauseTypical symptomWhat to do
Missing Seller ID.Notice says no Seller ID is configured.Add the Seller ID under Settings and save.
Wrong API Base URL (typo, missing scheme, wrong country/environment).Token request fails immediately, or response is not valid.Re-paste the URL from the source. Confirm with the API provider which URL applies to the dealer account.
Wrong Client ID or Client Secret.Authentication-related error from the token endpoint.Re-enter both values together; never partial.
Mismatched environment.Credentials authenticate but listings request returns an authorisation error.Make sure the API Base URL, Client ID/Secret and Seller ID all belong to the same environment.
Outbound traffic blocked by hosting firewall or WAF.Connection timeout or "could not connect" error.Ask the hosting provider to allow outbound HTTPS to the configured API host.
SSL trust failure.Error mentioning certificate verification, CA, or SSL handshake.Update the OS / PHP CA bundle through the hosting provider.
DNS resolution failure.Error mentioning "could not resolve host".Verify the API host name resolves on the server (DNS, hosts file).
Custom or non-standard token endpoint required by the provider.Token request fails even with apparently correct credentials.The plugin derives the token endpoint from the API Base URL automatically. Contact AD Promotion or your integration partner before changing this behaviour.
Seller ID not authorised for the credentials.Token succeeds, listings request fails with an authorisation error.Confirm seller authorisation with the API provider.
Account or API access disabled.Authentication or authorisation error returned by the API.Contact the API provider to verify the account is active and the API quota has not been exhausted.
Server cannot make outbound requests at all (e.g. air-gapped staging).Every external request fails.Either allow outbound traffic, or do not run the connection test on this environment.

Operational notes

  • Non-destructive. The connection test never imports data, never deletes data and never sends emails. It is safe to run on production.
  • Token cache interaction. A successful test populates the access-token cache. A failed test does not corrupt anything; it simply reports the error.
  • Tested seller. The test always uses the first configured Seller ID. If your account uses multiple Seller IDs, complement the connection test with a dry run from Tools, which previews data for every configured Seller ID without importing.
  • Use during operations. Re-running the connection test is one of the first steps in any "imports stopped working" investigation, before changing any settings.
  • Logs. Each test produces entries in the plugin log (wp-content/uploads/as24ci-logs/). When opening a support ticket, attach the relevant log section and screenshot of the admin notice.

Troubleshooting

SymptomLikely causeWhat to check
"Not connected – no Seller ID configured in Settings."Seller ID field is empty.Open Settings, enter the Seller ID, save, retry.
"Connection issue – could not fetch listings: …" with a timeout or "could not connect" message.Outbound network blocked, wrong API host, DNS or firewall issue.Verify network access and DNS; confirm the API Base URL with the provider. See API, Network and SSL Requirements.
Error message mentions SSL / certificate / CA.Server cannot validate the API host's TLS certificate.Update the CA bundle through the hosting provider.
Error message mentions authentication / token / unauthorized.Wrong Client ID, wrong Client Secret, or wrong API Base URL for the credentials.Re-enter both credential fields; verify the API Base URL matches the issuing environment.
Error message mentions forbidden / access denied / seller.Credentials are valid but not authorised for the configured Seller ID.Contact the API provider to verify authorisation.
Unexpected response from the API.API returned data in a shape the plugin does not recognise (provider change, proxy interfering with the response).Capture the relevant log entries and contact AD Promotion support.
Test succeeds, but imports fail later.Catalogue-specific issues (timeouts, image hosts, rate limits) rather than connectivity.Use the Batch-Wizard, enable the image queue, and review logs. See Import Errors and Image Import Errors.
Test results are inconsistent (sometimes succeeds, sometimes fails).Intermittent network or upstream API issue.Retry after a short delay; review the log for HTTP status codes. If the issue persists, escalate to the hosting provider and to the API provider.

For broader connection diagnostics, see API Connection Errors and Cron Errors.