# JWT Forensics Workflow

> JWT Forensics Workflow is a paid API for AI agents from agent402.tools, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Decodes a JWT, renders human-readable time claims, computes expiry duration, and optionally verifies an HMAC signature in a single bundled call

## Facts

- Endpoint: POST https://agent402.tools/api/skill/jwt-forensics
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/jwt-forensics-workflow-b3812865
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jrA1BrpiUpJuKdcOci63A

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability jwt-forensics-workflow-b3812865 -d '<json body>'
```

Example prompt: Can you inspect this JWT for me — eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c — decode it, show me the time claims in human-readable format, compute exactly how long until it expires, and verify the signature against my secret 'mysecretkey'.

## When to prefer this

Choose this endpoint when you need a complete JWT analysis in one call — decoding, human-readable time rendering, expiry computation, and optional HMAC verification — rather than calling separate decode or verify utilities individually. Ideal for debugging authentication issues, auditing tokens, or building agent workflows that need to reason about token validity.

## Known failure modes

- Malformed JWT (not three dot-separated base64url segments) returns a parse error
- Invalid or missing secret causes signature verification step to fail or be skipped
- Already-expired token will show negative time-to-expiry
- Non-HMAC algorithms (e.g. RS256) cannot be verified with a shared secret
- Payment failure (402) if USDC balance is insufficient

## How this service works

Bundled execution of the JWT forensics workflow - Someone hands you a JWT and asks 'is this valid?' Decode without verification first to see the shape, render the time claims (iat/nbf/exp) in human time, compute exactly how long until expiry, then...

## Output

Returns the decoded JWT header and payload, all time claims (iat, nbf, exp) rendered as human-readable timestamps, a computed duration until token expiry, and a signature verification result if a secret was provided

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "token": {
   "type": "string",
   "description": "The JWT to inspect (three dot-separated base64url segments)"
  },
  "secret": {
   "type": "string",
   "description": "Shared HMAC secret to verify the signature against (only used in step 4)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZ2VudDQwMiIsIm5hbWUiOiJkZW1vIGFnZW50IiwiaWF0IjoxNzAwMDAwMDAwLCJleHAiOjk5OTk5OTk5OTl9.NqggPBGuLX1OA7YuSlQ4S0INJfCOWnwXWT0XUIUrt3s",
   "secret": "my-secret"
  },
  "pack": "jwt-forensics",
  "steps": [
   {
    "ok": true,
    "slug": "jwt-decode",
    "result": {}
   },
   {
    "ok": true,
    "slug": "time-convert",
    "result": {}
   },
   {
    "ok": true,
    "slug": "date-diff",
    "result": {}
   },
   {
    "ok": true,
    "slug": "jwt-verify",
    "result": {}
   },
   {
    "ok": true,
    "slug": "base64",
    "result": {}
   },
   {
    "ok": true,
    "slug": "hash",
    "result": {}
   }
  ],
  "summary": "6/6 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/jwt-forensics-workflow-b3812865/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
