Create JWT – Encode and Sign a JSON Web Token
Create JWT – Encode and Sign a JSON Web Token
Input
Expects a json body
{
"payload": {
"userId": 42,
"role": "editor"
},
"secret": "my-shared-secret",
"algorithm": "HS256",
"expiresIn": 3600,
"issuer": "my-app"
}Output · HTTP 200
Response
{
"statusCode": 200
}Show curl command
curl -X POST 'https://api.1001fx.com/data/jwtencode' \
-H 'X-API-KEY: YOURSECRETAPIKEY' \
-H 'Content-Type: application/json' \
-d '{"payload":{"userId":42,"role":"editor"},"secret":"my-shared-secret","algorithm":"HS256","expiresIn":3600,"issuer":"my-app"}'