{"uid":"cap_nCfSvGU1sBsodzrgQaxS1","slug":"jwt-decode-expiry-check-66c7b60b","name":"JWT Decode & Expiry Check","description":"Decode a JWT header and payload (no signature verification); flags expiry.","url":"https://api.24klabs.ai/api/v1/jwt-decode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"token":{"type":"string"}}},"responseSchema":{"type":"json","example":{"header":{},"payload":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hsrJlnBpmi_KDEvzO-4c9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes a JWT token's header and payload without verifying the signature, and flags whether the token is expired.","exampleAgentPrompt":"Can you decode this JWT token and tell me what's in the header and payload, and whether it's already expired? eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiZXhwIjoxNjAwMDAwMDAwfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c","exampleUseCases":[{"title":"Debug an expired auth token","prompt":"I've got this JWT that my app keeps rejecting — can you decode it and tell me if it's expired and what claims are inside? eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI0MiIsImV4cCI6MTY5MDAwMDAwMH0.signature"},{"title":"Extract user identity from token","prompt":"Can you pull the user ID, email, and roles out of this JWT token for me without needing the signing secret? eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiI5OTkiLCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJyb2xlcyI6WyJhZG1pbiJdfQ.sig"},{"title":"Validate token freshness in a pipeline","prompt":"Before I pass this token downstream, can you decode it and flag whether it's expired so I know if I need to refresh it? Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzEyMyIsImV4cCI6MTcwMDAwMDAwMH0.abc"}],"resultDescription":"Returns the decoded JWT header (algorithm, token type) and payload (all claims including sub, iat, exp, and any custom claims), plus an explicit flag indicating whether the token is currently expired based on the exp claim. No signature verification is performed.","failureModes":["Malformed JWT string (not three dot-separated base64 segments) returns a parse error","Missing or non-numeric exp claim may result in expiry flag being indeterminate","Network timeout or service unavailability returns an HTTP 5xx error","Empty or null token input returns a validation error"],"whenToPreferThis":"Use this endpoint when you need to quickly inspect or debug a JWT's claims and expiry status without access to the signing secret or public key. Ideal for logging pipelines, debugging auth issues, extracting user metadata from tokens, or checking freshness before making downstream calls. Not suitable when cryptographic signature verification is required for security-sensitive decisions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:52:30.247Z","isFirstParty":false}