POST /
The response’s attempt_id names this attempt; the test result carries the same ID once it is recorded, so a caller can ignore an earlier attempt’s result. scenario picks one of the sandbox test IdP’s outcomes and is accepted only in a sandbox environment (sandbox_required elsewhere) on a connection whose IdP is the test IdP (test_idp; parameter_invalid otherwise). time_shift and certificate follow the same rules.
- Scope
connections:write- Auth
- Secret key (
sk_…) - Since
- 1.0
Path parameters
Section titled “Path parameters”connstring Required
Headers
Section titled “Headers”
Minor version; defaults to the environment’s pin.OhAuthCat-Versionstring
Honoured for 24 h; a replay returns the original response.Idempotency-Keystringmin length 1 · max length 255
Request body
Section titled “Request body”
A sandbox test IdP outcome (sandbox environments and test IdP connections only).scenariostringrotated_certsigns with the test IdP’s rotated key (refused withsaml_signature_invaliduntil the connection trusts the rotated certificate) andexpiring_certwith a key whose certificate expires within days, so a certificate rollover and the expiry alerts can be rehearsed;revoked_useris the IdP refusing a user whose access it revoked (saml_idp_status_error, oroidc_token_exchange_failedfor OIDC).one of
sp_initiated,idp_initiated,guest_domain,bad_signature,expired,wrong_audience,missing_email,rotated_cert,expiring_cert,revoked_user
Time travel for the sandbox test IdP (sandbox environments and test IdP connections only), a duration such astime_shiftstring-10mor2h, at most 24h either way. Only the test IdP’s clock moves; documents outside the broker’s skew allowance are refused as they would be from a real IdP with a wrong clock.max length 16
The certificate the sandbox test IdP signs with (sandbox environments and test IdP connections only).certificatestringrotatedandexpiringlet a certificate rollover be rehearsed with any scenario; withrotated_certorexpiring_certit must name that scenario’s key (parameter_invalid otherwise).one of
current,rotated,expiring
Responses
Section titled “Responses”- 200 OK ConnectionTest
- 400 Invalid request. Codes: parameter_invalid, parameter_missing, version_unsupported and resource-specific codes from the catalogue. Error
- 401 Codes: authentication_required, api_key_invalid. Error
- 403 Codes: api_key_scope_missing, ip_not_allowed, plan_limit_reached. Error
- 404 Code: resource_not_found (also returned for other tenants’ IDs); a path no endpoint serves answers route_not_found. A browser GET or HEAD of an unknown path whose Accept ranks text/html above JSON gets an HTML 404 page instead, with the same status; every other client gets this JSON body. Error
- 409 Codes: idempotency_key_reused and resource-specific conflicts. Error
- 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
Errors share one shape; see the error code catalogue.
curl -X POST \ "https://api.ohauthcat.com/v1/connections/conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/test" \ -H "Authorization: Bearer $OHAUTHCAT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "scenario": "sp_initiated", "time_shift": "-10m", "certificate": "current"}'const response = await fetch("https://api.ohauthcat.com/v1/connections/conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/test", { method: "POST", headers: { Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "scenario": "sp_initiated", "time_shift": "-10m", "certificate": "current" }),});const data = await response.json();import osimport requests
response = requests.post( "https://api.ohauthcat.com/v1/connections/conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/test", headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"}, json={ "scenario": "sp_initiated", "time_shift": "-10m", "certificate": "current", },)data = response.json(){ "test_url": "https://app.acme.com/callback", "expires_at": "2026-01-15T09:30:00Z", "attempt_id": "sgn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "started_at": "2026-01-15T09:30:00Z"}