# Open Badges 2.0 / 3.0 credential verifier (`davidcondrey/wl-open-badges-verifier`) Actor

Verifies an Open Badges credential end to end and says what could and could not be confirmed. Accepts an Open Badges 3.0 credential (JSON with an eddsa-jcs-2022 proof, or a VC-JWT signed with EdDSA, ES256 or RS256), an Open Badges 2.0 assertion (hosted, or signed as an RS256…

- **URL**: https://apify.com/davidcondrey/wl-open-badges-verifier.md
- **Developed by:** [WritersLogic](https://apify.com/davidcondrey) (community)
- **Categories:** AI, Agents, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$70.00 / 1,000 open badges 2.0 / 3.0 credential verifier runs

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Open Badges 2.0 / 3.0 credential verifier

Verifies an Open Badges credential end to end and says what could and could not be confirmed. Accepts an Open Badges 3.0 credential (JSON with an eddsa-jcs-2022 proof, or a VC-JWT signed with EdDSA, ES256 or RS256), an Open Badges 2.0 assertion (hosted, or signed as an RS256 JWS), a hosted-assertion URL, or a baked PNG or SVG image. Checks the 2.0/3.0 required fields, the issuance and expiry window, the signature, that the signing key (did:key, did:web, JWKS or CryptographicKey) really belongs to the named issuer, the hosted-assertion, BadgeClass and Issuer chain with allowedOrigins and startsWith rules, and revocation (2.0 revocation lists and revoked flag, 3.0 1EdTechRevocationList and Bitstring status lists). Optionally confirms a recipient's email or identity against the badge's salted hash. Every check is pass, fail, unknown (for example an issuer host was unreachable) or unsupported (for example an RDF-canonicalization proof suite), and the verdict is valid only when nothing failed and nothing is left open. No model is used. Remote documents are fetched through an SSRF-guarded client, at most 12 per call, and JSON-LD contexts are never fetched.

Every result is a **signed, verifiable answer**:

- a W3C Verifiable Credential 2.0, signed with `eddsa-jcs-2022` by `did:web:agents.writerslogic.com`;
- a C2PA-style manifest that lists every source the agent read, each with its SHA-256;
- an EIP-191 co-signature over the same digest.

Change one byte and verification fails, so you can pass the result to a client, an auditor or another agent and they can check it without trusting you or us.

### How to use Open Badges 2.0 / 3.0 credential verifier

1. Fill in the input form. Required fields are marked; the form opens with a working example.
2. Start the run.
3. Read the result in the **Output** tab, or download the dataset as JSON. The full signed envelope is also saved as the `OUTPUT` record in the key-value store.

### Input

| Field | Required | Description |
|---|---|---|
| `credential` | no | The credential or assertion as a JSON object (or the same as a JSON string, or a compact JWS string). |
| `jws` | no | A compact JWS: an Open Badges 3.0 VC-JWT or an Open Badges 2.0 signed assertion. |
| `url` | no | https URL of a hosted Open Badges 2.0 assertion or a hosted 3.0 credential. |
| `image` | no | A baked badge image, base64 (data URLs accepted): a PNG with an openbadges iTXt chunk, or an SVG with an openbadges:assertion or openbadges:credential element. Up to 6 MB decoded. |
| `recipientIdentity` | no | Optional: the recipient's email or other identity to compare against the badge's recipient, including salted sha256$ and md5$ hashes. |

Example input:

```json
{
  "credential": {
    "@context": [
      "https://www.w3.org/ns/credentials/v2",
      "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"
    ],
    "id": "urn:uuid:5b6d2c1e-0c1a-4a52-9a53-0c0f7a1c9e11",
    "type": [
      "VerifiableCredential",
      "OpenBadgeCredential"
    ],
    "issuer": {
      "id": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
      "type": [
        "Profile"
      ],
      "name": "Example University"
    },
    "validFrom": "2025-01-15T00:00:00Z",
    "name": "Example Achievement",
    "credentialSubject": {
      "type": [
        "AchievementSubject"
      ],
      "identifier": [
        {
          "type": "IdentityObject",
          "hashed": false,
          "identityHash": "learner@example.org",
          "identityType": "emailAddress"
        }
      ],
      "achievement": {
        "id": "https://issuer.example/achievements/1",
        "type": [
          "Achievement"
        ],
        "name": "Example Achievement",
        "description": "Awarded for completing the example course.",
        "criteria": {
          "narrative": "Complete all modules with a passing grade."
        }
      }
    },
    "proof": {
      "type": "DataIntegrityProof",
      "cryptosuite": "eddsa-jcs-2022",
      "created": "2025-01-15T00:00:00Z",
      "verificationMethod": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn#z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
      "proofPurpose": "assertionMethod",
      "proofValue": "z3iyvJ3hfobNHzMPsBC39QPoo57kX7UWTBkCjL7wda4hxWDoeDeb1tQPq7HueQbbAxBEofghDqXa1rG8MEJexaUWt"
    }
  },
  "recipientIdentity": "learner@example.org"
}
```

### Output

```json
{
  "agent": "open-badges-verifier",
  "priceUsd": 0.07,
  "data": { "...": "the agent's answer" },
  "_provenance": { "credential": {}, "manifest": {}, "ethSignature": "0x..." }
}
```

To check a result for free, POST `{ "data": ..., "_provenance": ... }` to `https://agents.writerslogic.com/api/v1/verify-provenance`, or verify it offline against the public key in the [DID document](https://agents.writerslogic.com/.well-known/did.json).

### Pricing

**$0.07 per successful run**, charged once and only after the agent returns its answer. If the input is rejected or the agent fails, you are not charged for the call.

### Use it from code or an AI assistant

- Apify API and integrations: call this Actor from Make, Zapier, n8n, LangChain or the Apify API like any other Actor.
- MCP: `npx -y @writerslogic/ai-agents-mcp` exposes this agent and the rest of the hub as tools.
- x402: the same agent is available at `POST https://agents.writerslogic.com/api/v1/open-badges-verifier`, paid per call in USDC on Base.

### More verifiable agents

- [PR / Dependency Breaking-Change & Exploit Gatekeeper](https://apify.com/davidcondrey/wl-diff-gatekeeper)
- [Legal citation and quotation verifier (US case law)](https://apify.com/davidcondrey/wl-legal-cite-verifier)
- [arXiv-to-Production Code & Hyperparameter Compiler](https://apify.com/davidcondrey/wl-arxiv-to-code)
- [Adversarial Unicode & Trojan Source gatekeeper](https://apify.com/davidcondrey/wl-unicode-safety-gate)
- [SMT Contract & Policy Logic Prover](https://apify.com/davidcondrey/wl-smt-contract-prover)
- [AI-BOM License Chain Resolver for Hugging Face Models](https://apify.com/davidcondrey/wl-ai-bom-license-resolver)
- [All agents in one Actor](https://apify.com/davidcondrey/verifiable-ai-agents)

### FAQ

**Who runs this?** [WritersLogic](https://writerslogic.com/agents). The agent runs on the WritersLogic Verifiable AI Agent Hub; this Actor sends your input there and returns the signed result.

**Is my input stored?** The Actor stores your result in your own Apify storage. Ask before sending confidential documents; the hub is a third-party service from your point of view.

# Actor input Schema

## `credential` (type: `object`):

The credential or assertion as a JSON object (or the same as a JSON string, or a compact JWS string).

## `jws` (type: `string`):

A compact JWS: an Open Badges 3.0 VC-JWT or an Open Badges 2.0 signed assertion.

## `url` (type: `string`):

https URL of a hosted Open Badges 2.0 assertion or a hosted 3.0 credential.

## `image` (type: `string`):

A baked badge image, base64 (data URLs accepted): a PNG with an openbadges iTXt chunk, or an SVG with an openbadges:assertion or openbadges:credential element. Up to 6 MB decoded.

## `recipientIdentity` (type: `string`):

Optional: the recipient's email or other identity to compare against the badge's recipient, including salted sha256$ and md5$ hashes.

## Actor input object example

```json
{
  "credential": {
    "@context": [
      "https://www.w3.org/ns/credentials/v2",
      "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"
    ],
    "id": "urn:uuid:5b6d2c1e-0c1a-4a52-9a53-0c0f7a1c9e11",
    "type": [
      "VerifiableCredential",
      "OpenBadgeCredential"
    ],
    "issuer": {
      "id": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
      "type": [
        "Profile"
      ],
      "name": "Example University"
    },
    "validFrom": "2025-01-15T00:00:00Z",
    "name": "Example Achievement",
    "credentialSubject": {
      "type": [
        "AchievementSubject"
      ],
      "identifier": [
        {
          "type": "IdentityObject",
          "hashed": false,
          "identityHash": "learner@example.org",
          "identityType": "emailAddress"
        }
      ],
      "achievement": {
        "id": "https://issuer.example/achievements/1",
        "type": [
          "Achievement"
        ],
        "name": "Example Achievement",
        "description": "Awarded for completing the example course.",
        "criteria": {
          "narrative": "Complete all modules with a passing grade."
        }
      }
    },
    "proof": {
      "type": "DataIntegrityProof",
      "cryptosuite": "eddsa-jcs-2022",
      "created": "2025-01-15T00:00:00Z",
      "verificationMethod": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn#z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
      "proofPurpose": "assertionMethod",
      "proofValue": "z3iyvJ3hfobNHzMPsBC39QPoo57kX7UWTBkCjL7wda4hxWDoeDeb1tQPq7HueQbbAxBEofghDqXa1rG8MEJexaUWt"
    }
  },
  "recipientIdentity": "learner@example.org"
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset item per call: the agent id, the price charged, the agent's result (data) and its signed provenance record (\_provenance).

## `credential` (type: `string`):

The full hub response as a W3C Verifiable Credential with a C2PA-style manifest; verify it at https://agents.writerslogic.com/api/v1/verify-provenance.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "credential": {
        "@context": [
            "https://www.w3.org/ns/credentials/v2",
            "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"
        ],
        "id": "urn:uuid:5b6d2c1e-0c1a-4a52-9a53-0c0f7a1c9e11",
        "type": [
            "VerifiableCredential",
            "OpenBadgeCredential"
        ],
        "issuer": {
            "id": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
            "type": [
                "Profile"
            ],
            "name": "Example University"
        },
        "validFrom": "2025-01-15T00:00:00Z",
        "name": "Example Achievement",
        "credentialSubject": {
            "type": [
                "AchievementSubject"
            ],
            "identifier": [
                {
                    "type": "IdentityObject",
                    "hashed": false,
                    "identityHash": "learner@example.org",
                    "identityType": "emailAddress"
                }
            ],
            "achievement": {
                "id": "https://issuer.example/achievements/1",
                "type": [
                    "Achievement"
                ],
                "name": "Example Achievement",
                "description": "Awarded for completing the example course.",
                "criteria": {
                    "narrative": "Complete all modules with a passing grade."
                }
            }
        },
        "proof": {
            "type": "DataIntegrityProof",
            "cryptosuite": "eddsa-jcs-2022",
            "created": "2025-01-15T00:00:00Z",
            "verificationMethod": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn#z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
            "proofPurpose": "assertionMethod",
            "proofValue": "z3iyvJ3hfobNHzMPsBC39QPoo57kX7UWTBkCjL7wda4hxWDoeDeb1tQPq7HueQbbAxBEofghDqXa1rG8MEJexaUWt"
        }
    },
    "recipientIdentity": "learner@example.org"
};

// Run the Actor and wait for it to finish
const run = await client.actor("davidcondrey/wl-open-badges-verifier").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "credential": {
        "@context": [
            "https://www.w3.org/ns/credentials/v2",
            "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json",
        ],
        "id": "urn:uuid:5b6d2c1e-0c1a-4a52-9a53-0c0f7a1c9e11",
        "type": [
            "VerifiableCredential",
            "OpenBadgeCredential",
        ],
        "issuer": {
            "id": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
            "type": ["Profile"],
            "name": "Example University",
        },
        "validFrom": "2025-01-15T00:00:00Z",
        "name": "Example Achievement",
        "credentialSubject": {
            "type": ["AchievementSubject"],
            "identifier": [{
                    "type": "IdentityObject",
                    "hashed": False,
                    "identityHash": "learner@example.org",
                    "identityType": "emailAddress",
                }],
            "achievement": {
                "id": "https://issuer.example/achievements/1",
                "type": ["Achievement"],
                "name": "Example Achievement",
                "description": "Awarded for completing the example course.",
                "criteria": { "narrative": "Complete all modules with a passing grade." },
            },
        },
        "proof": {
            "type": "DataIntegrityProof",
            "cryptosuite": "eddsa-jcs-2022",
            "created": "2025-01-15T00:00:00Z",
            "verificationMethod": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn#z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
            "proofPurpose": "assertionMethod",
            "proofValue": "z3iyvJ3hfobNHzMPsBC39QPoo57kX7UWTBkCjL7wda4hxWDoeDeb1tQPq7HueQbbAxBEofghDqXa1rG8MEJexaUWt",
        },
    },
    "recipientIdentity": "learner@example.org",
}

# Run the Actor and wait for it to finish
run = client.actor("davidcondrey/wl-open-badges-verifier").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "credential": {
    "@context": [
      "https://www.w3.org/ns/credentials/v2",
      "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"
    ],
    "id": "urn:uuid:5b6d2c1e-0c1a-4a52-9a53-0c0f7a1c9e11",
    "type": [
      "VerifiableCredential",
      "OpenBadgeCredential"
    ],
    "issuer": {
      "id": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
      "type": [
        "Profile"
      ],
      "name": "Example University"
    },
    "validFrom": "2025-01-15T00:00:00Z",
    "name": "Example Achievement",
    "credentialSubject": {
      "type": [
        "AchievementSubject"
      ],
      "identifier": [
        {
          "type": "IdentityObject",
          "hashed": false,
          "identityHash": "learner@example.org",
          "identityType": "emailAddress"
        }
      ],
      "achievement": {
        "id": "https://issuer.example/achievements/1",
        "type": [
          "Achievement"
        ],
        "name": "Example Achievement",
        "description": "Awarded for completing the example course.",
        "criteria": {
          "narrative": "Complete all modules with a passing grade."
        }
      }
    },
    "proof": {
      "type": "DataIntegrityProof",
      "cryptosuite": "eddsa-jcs-2022",
      "created": "2025-01-15T00:00:00Z",
      "verificationMethod": "did:key:z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn#z6MkgAnvkP45uNxwCKeNdt6wrYkEjpYX4f7Nrd8MQqFL8Fbn",
      "proofPurpose": "assertionMethod",
      "proofValue": "z3iyvJ3hfobNHzMPsBC39QPoo57kX7UWTBkCjL7wda4hxWDoeDeb1tQPq7HueQbbAxBEofghDqXa1rG8MEJexaUWt"
    }
  },
  "recipientIdentity": "learner@example.org"
}' |
apify call davidcondrey/wl-open-badges-verifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,davidcondrey/wl-open-badges-verifier"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TygyPawS5r0pCueXg/builds/hlfHXEZP7gBQFWnb1/openapi.json
