Skip to content
moxon home

JWT

The /jwt endpoint decodes a JSON Web Token without verifying the signature. Expiration is detected via the exp claim.

posthttps://api.moxon.dev/v6/jwt
Try itpost/v6/jwt

Parameters

The request body must be JSON:

  • tokenstringrequired

    JWT token to decode

Response Fields

  • headerobject

    Decoded JWT header (algorithm, type, etc.)

  • payloadobject

    Decoded JWT payload (claims)

  • signaturestring

    Raw signature string (not verified)

  • expiredboolean

    true if exp is in the past — absent if no exp claim

Code Examples

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Please provide a token (?token={token})The token parameter is missing
  • 400Token cannot exceed 8192 charactersThe token exceeds the maximum length
  • 400Invalid JWT format. Expected 3 parts separated by "."The token does not have 3 dot-separated parts
  • 400Invalid JWT header: not a valid base64url-encoded JSON objectThe header part is not valid base64url JSON, or decodes to something other than an object (e.g. an array or string)
  • 400Invalid JWT payload: not a valid base64url-encoded JSON objectThe payload part is not valid base64url JSON, or decodes to something other than an object