Auth Report API

Use a correlation ID to fetch match scores and fraud flags for a verification.

The redirect tells you what went wrong. The Auth Report API tells you how badly — the match score, and the specific fraud flags on a document.

📘

Availability

This API is part of detailed error reporting, an optional capability enabled per client and subject to commercial agreement. It is most commonly used with the verified credentials flow.

If your client isn't configured for it you won't receive a correlation ID, and there's nothing to look up. Speak to your Interac representative if your use case requires it.

Before you start

Two requirements, both configured by Interac:

  1. Detailed error reporting, so you receive a cid on the redirect.
  2. client_credentials in your client's grant types. This API uses a different OAuth flow from the rest of Hub.
🚧

The Auth Report API isn't currently available for clients using asynchronous result delivery.

Three steps

  1. Get the cid from the redirect
  2. Get an access token
  3. Fetch the report
sequenceDiagram
    participant U as User
    participant RP as Your app
    participant H as Hub

    Note over U,H: The verification ends
    H->>U: Redirect back
    U->>RP: 1. redirect_uri?…&cid=…
    RP->>H: 2. POST /oauth2/token (client_credentials)
    H-->>RP: access_token
    RP->>H: 3. GET /auth/report/{cid} (access_token)
    H-->>RP: match score, fraud flags

Step 1 happens on the redirect, like any other result. Steps 2 and 3 are calls from your server, made whenever you need the details.

Step 1 — Get the correlation ID

It arrives on the redirect, whether the verification succeeded or failed:

https://acme-widgets.example.com/callback
  ?error=access_denied
  &error_description=...
  &cid=e661b5a0-4f33-4738-b6a0-0274bb455370
📘

Store the cid against the user's session as soon as you receive it. You'll need it for support enquiries even if you don't call this API.

Step 2 — Get an access token

Same token_endpoint as the main flow, but a different grant type.

Pick the tab you prefer. curl runs as-is in a terminal. HTTP shows exactly what's sent, so you can rebuild it with any HTTP library.

curl -X POST '{hub_base_url}/oauth2/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials' \
  -d 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
  -d 'client_assertion=eyJhbGciOiJSUzI1NiI..._9xOx-1_sYxA'
POST {hub_base_url}/oauth2/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion=eyJhbGciOiJSUzI1NiI..._9xOx-1_sYxA

In the HTTP tab, the body is split across lines for readability. It's sent as a single line. Your HTTP library normally URL-encodes the values for you.

ParameterValue
grant_typeclient_credentials — not authorization_code
client_assertion_typeurn:ietf:params:oauth:client-assertion-type:jwt-bearer
client_assertionA signed JWT, same structure as Step 4

The client assertion payload:

{
  "iss": "3f6c1a2e-8b47-4d19-9e52-7a0c4b6d1f83",
  "sub": "3f6c1a2e-8b47-4d19-9e52-7a0c4b6d1f83",
  "aud": "{hub_base_url}/oauth2/token",
  "exp": 1675972884,
  "jti": "35a5bae49a834eb684c8c88ef7190475"
}
🚧

jti must be unique for every request. Reusing one will fail.

Response:

{
  "access_token": "ory_at_28b1R6ONqvJKcecTWv8gGbnpvn2r6HE9M6XpCcs7wuC3a9PSRvmM",
  "expires_in": 1800,
  "token_type": "bearer"
}

Step 3 — Fetch the report

curl '{hub_base_url}/auth/report/e661b5a0-4f33-4738-b6a0-0274bb455370' \
  -H 'Authorization: Bearer ory_at_28b1R6ONqvJKcecTWv8gGbnpvn2r6HE9M6XpCcs7wuC3a9PSRvmM'
GET {hub_base_url}/auth/report/e661b5a0-4f33-4738-b6a0-0274bb455370 HTTP/1.1
Authorization: Bearer ory_at_28b1R6ONqvJKcecTWv8gGbnpvn2r6HE9M6XpCcs7wuC3a9PSRvmM

The last part of the path, e661b5a0-…, is the cid from Step 1.

❗️

This is a GET request. Older documentation shows POST. Use GET.

The report

{
  "error_code": "user_cancelled",
  "error_details": "cancelled_on_landing_page",
  "stage": "sharing_init",
  "match_score": null,
  "rejected_flags": null,
  "suspected_flags": null
}
FieldWhat it isWhen it's empty
error_codeSame values as err in the redirect. See Error codes for the full list.""
error_detailsSame values as details in the redirect. See Details values for the full list. In the verified credentials flow, the app can also send values that aren't listed.""
stageSame values as stage in the redirect. See Stages. New values can appear, so treat it as extra context.""
match_scoreA number from 0 to 100. Present for matching failures.null
rejected_flagsWhy a document was rejected. See Fraud flags for the full list.null
suspected_flagsWhy a document or selfie was suspected. See Fraud flags for the full list.null

All six fields are always present.

🚧

Empty text fields are "", not null. Only match_score and the two flag arrays use null. Check for both if you're testing "is this set?".

Reports you might not expect

A successful verification returns every field empty:

{
  "error_code": "",
  "error_details": "",
  "stage": "",
  "match_score": null,
  "rejected_flags": null,
  "suspected_flags": null
}

A session that timed out with nothing else recorded returns "error_code": "session_timeout" and an empty stage.

An unknown or foreign cid returns 400 with Provided invalid or unknown correlation id. You can only fetch reports for your own client's verifications.

What it's actually useful for

Match scores. The redirect tells you matching failed; the report tells you it scored 62 against a threshold of 65. That's the difference between an automatic decline and a manual review.

{
  "error_code": "idv_data_matching_failed",
  "error_details": "mismatch",
  "stage": "issuance",
  "match_score": 50,
  "rejected_flags": null,
  "suspected_flags": null
}

Fraud flags. The redirect says the document was rejected; the report says why.

{
  "error_code": "document_rejected",
  "error_details": "",
  "stage": "issuance",
  "match_score": null,
  "rejected_flags": ["conclusive_document_quality"],
  "suspected_flags": ["face_match"]
}

conclusive_document_quality means the photo wasn't good enough to judge — worth asking the user to retry. face_match means the selfie didn't match the document — not worth an automatic retry. Same error code, very different responses.

📘

In the verified credentials flow, the bank or document check runs as a step inside the larger flow. When that step fails, the report returns its details — which is how the score and flags reach you.

Common mistakes

ProblemCause
405 Method Not AllowedYou sent POST. It's a GET.
401 UnauthorizedToken expired, or Bearer prefix missing
invalid_client on the token callclient_credentials not enabled, or wrong aud
No cid to useYour client isn't configured for detailed error reporting
Works once, then failsYou reused jti

Don't call it on every failure

Most failures don't need it. A cancellation report tells you nothing the redirect didn't.

Call it when:

  • Matching failed and you need the score
  • A document was rejected or suspected and you need the flags
  • You're investigating a specific user's problem

Otherwise just log the cid.