> For the complete documentation index, see [llms.txt](https://docs.nfh.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nfh.global/product-documentation/products/vc-on-edge/verifying.md).

# Verifying credentials

Four ways to verify an OpenCred credential — all running the same engine — and the common result shape.

Anyone holding an OpenCred-issued credential has four supported ways to verify it. All four run the same `@opencred/verification` engine — pick the surface that matches your environment.

| Path                                              | Best for                                           | Inputs accepted                                                                                                                                                               |
| ------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Desktop app — Verify tab**                      | Casual / one-off verification by humans            | Pasted JSON · drag-dropped `.json` / `.jsonld` · QR image (PNG/JPG) · `.pdf` upload · live camera QR scan · pasted compact tokens (vc-jwt, sd-jwt-vc, bare PixelPass QR data) |
| **Docker server — `POST /v1/credentials/verify`** | Programmatic / server-to-server / CI/CD            | JSON body for text formats (auto-detected) **or** raw PDF body with `Content-Type: application/pdf`                                                                           |
| **`opencred verify` CLI**                         | One-shot verification from a shell, no HTTP server | File path or stdin; auto-detects JSON-LD, vc-jwt, sd-jwt-vc, PixelPass QR, or PDF. `--json` for scripts. Ships in the Docker image.                                           |
| **`@opencred/verification` library**              | Embedding verification in a Node.js app            | Same formats, via `verifyCredential` and `verifyPdf`                                                                                                                          |

## The result shape

Every path returns the same shape:

* a top-level `valid: true | false`
* an enum `code`: `VALID`, `REVOKED`, `EXPIRED`, `INVALID`, `UNRESOLVABLE`, `CONTEXT_MISSING`
* a per-check breakdown: signature, expiry, key resolution, `x5c` chain (where applicable), revocation, schema, context

## What needs network access

| Credential type          | Offline?                                                                                                                              |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `did:key`-issued         | **Verifies fully offline.**                                                                                                           |
| `did:web`-issued         | Needs network to fetch the issuer's DID document.                                                                                     |
| DSC-backed (`x5c` chain) | Needs a CSCA trust store on disk. See [Concepts → Trust chains](/product-documentation/products/vc-on-edge/concepts.md#trust-chains). |

## PDF certificates

OpenCred packages credentials as printable PDFs with a scannable QR **and** a copy of the payload in the PDF's info dictionary. Any path works — drop the PDF into the Desktop **Verify** tab, `POST` it to `/v1/credentials/verify`, or pipe it into the CLI:

```bash
opencred verify --input - < credential.pdf
```

Older PDFs (issued before info-dict embedding shipped) surface a clear "scan the QR or extract the embedded JSON" message rather than a generic failure.

## Examples

**HTTP (JSON credential):**

```bash
curl -X POST http://localhost:3100/v1/credentials/verify \
  -H "Authorization: Bearer $OPENCRED_API_KEY" \
  -H "Content-Type: application/json" \
  --data @credential.json
```

**HTTP (PDF):**

```bash
curl -X POST http://localhost:3100/v1/credentials/verify \
  -H "Authorization: Bearer $OPENCRED_API_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @certificate.pdf
```

**CLI (scripted):**

```bash
opencred verify --input credential.json --json
```

***

**Related:** [Concepts → Revocation](/product-documentation/products/vc-on-edge/concepts.md#revocation) · [Docker → API](/product-documentation/products/vc-on-edge/docker.md#http-api) · [Desktop app](/product-documentation/products/vc-on-edge/desktop.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nfh.global/product-documentation/products/vc-on-edge/verifying.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
