ToolsXpo

Security

JWT Encoder (HS256) API

GET request to /v1/jwt-encoder, returning text in the standard envelope.

GET/v1/jwt-encoder2 credits / call Free tier

Authentication

Send your API key as a bearer token. Create one free in the dashboard.

Authorization: Bearer $TOOLSXPO_KEY

Parameters

Sent as query-string parameters. The values below are the examples used throughout this page.

NameExample value
header{"alg":"HS256","typ":"JWT"}
payload{"sub":"1234567890","name":"Alice","iat":1516239022}
secretmy-secret

Example request

curl "https://api.toolsxpo.com/v1/jwt-encoder?header=%7B%22alg%22%3A%22HS256%22%2C%22typ%22%3A%22JWT%22%7D&payload=%7B%22sub%22%3A%221234567890%22%2C%22name%22%3A%22Alice%22%2C%22iat%22%3A1516239022%7D&secret=my-secret" \
  -H "Authorization: Bearer $TOOLSXPO_KEY"

Response

Every endpoint answers with the same envelope. The result is in data (text); meta.credits reports what the call cost.

{
  "ok": true,
  "data": { /* text */ },
  "meta": { "credits": 2 }
}

Errors

Failures use the same envelope with ok: false and a machine-readable code.

StatusCodeMeaning
400invalid_inputA parameter failed validation. `details` lists which.
401unauthorizedMissing or invalid API key.
402quota_exceededOut of credits on this workspace.
404not_foundNo such tool.
429rate_limitedToo many requests. Retry after `Retry-After` seconds.
503service_unavailableTemporarily disabled by an administrator.