Skip to main content
POST
/
:projectId
/
crypto
/
sign-testing-jwt
Sign Testing JWT
curl --request POST \
  --url https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt \
  --header 'Content-Type: application/json' \
  --data '{
  "projectId": "<string>",
  "privateKey": "<string>",
  "payload": {
    "id": "<string>",
    "name": "<string>",
    "role": "<string>"
  }
}'
{
  "token": "<string>"
}
Generate a signed JWT for testing purposes using a provided private key, project ID, and payload.
This endpoint is intended for testing and should not be exposed in production environments.

Body Parameters

projectId
string
required
Project ID to use as the token issuer
privateKey
string
required
Private key in base64-encoded PEM format
payload
object
required
Payload to embed in the token. Must include an id field

Response

Returns a signed JWT string:
token
string
The signed JWT token

Error Responses

{
  "error": "Missing user id in payload.",
  "code": "crypto/missing-params"
}
{
  "error": "Internal server error",
  "code": "crypto/server-error",
  "details": "<Error message>"
}

Notes

  • For testing purposes only - do not expose in production
  • The payload must contain an id field which will be used as the sub in the JWT
  • The signed token uses the RS256 algorithm and is valid for 5 minutes
  • The audience (aud) is set to replyke.com
  • No authentication required (intentionally, for testing)
  • Use this endpoint to generate test tokens for local development
I