If you issue credentials, sooner or later someone asks: "how do I know this badge is real?" The honest answer should never be "trust the PNG." Open Badge v2.0 solves this with a public, machine-readable verification endpoint, and putting a "Verified" widget on your own site takes about ten lines of code. No iframe, no third-party embed script, no SDK.
This post shows how to call the endpoint and render the result in vanilla JavaScript, Node, and Python. It also covers what "verification" actually checks, and the mistakes that make a widget look done while proving nothing.
What "verified" actually means
An Open Badge v2.0 assertion is a JSON-LD document with a fixed shape: the assertion itself (who received it, when), a reference to the BadgeClass (what it is, who defines the criteria), and a reference to the issuer profile (who is vouching for it). Verifying a badge means checking three separate things:
Does the assertion exist and resolve.…