About this endpoint
What it does
Signs a JSON payload into a JWT using the provided secret and returns the generated token. The request body includes the payload to encode, the signing secret, and an optional algorithm.
Request Body
| Parameter | Type | Description |
|---|---|---|
| payload | Object | JSON payload to encode into the JWT. |
| secret | String | Secret key used to sign the token. |
| algorithm | String | Signing algorithm to use. Default: HS256. |
Response
Returns a JSON object with a token string field containing the signed JWT.
| Parameter | Type | Description |
|---|---|---|
| token | String | The generated JWT string. |



