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>"
}
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt"
payload = {
"projectId": "<string>",
"privateKey": "<string>",
"payload": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '<string>',
privateKey: '<string>',
payload: {id: '<string>', name: '<string>', role: '<string>'}
})
};
fetch('https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'projectId' => '<string>',
'privateKey' => '<string>',
'payload' => [
'id' => '<string>',
'name' => '<string>',
'role' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>"
}Crypto Endpoints
Sign Testing JWT
Generate a signed JWT for testing purposes
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>"
}
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt"
payload = {
"projectId": "<string>",
"privateKey": "<string>",
"payload": {
"id": "<string>",
"name": "<string>",
"role": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
projectId: '<string>',
privateKey: '<string>',
payload: {id: '<string>', name: '<string>', role: '<string>'}
})
};
fetch('https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'projectId' => '<string>',
'privateKey' => '<string>',
'payload' => [
'id' => '<string>',
'name' => '<string>',
'role' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt"
payload := strings.NewReader("{\n \"projectId\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/crypto/sign-testing-jwt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"projectId\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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
Project ID to use as the token issuer
Private key in base64-encoded PEM format
Response
Returns a signed JWT string:The signed JWT token
Error Responses
Missing Params - 400 Bad Request
Missing Params - 400 Bad Request
{
"error": "Missing user id in payload.",
"code": "crypto/missing-params"
}
Server Error - 500 Internal Server Error
Server Error - 500 Internal Server Error
{
"error": "Internal server error",
"code": "crypto/server-error",
"details": "<Error message>"
}
Notes
- For testing purposes only - do not expose in production
- The
payloadmust contain anidfield which will be used as thesubin the JWT - The signed token uses the RS256 algorithm and is valid for 5 minutes
- The audience (
aud) is set toreplyke.com - No authentication required (intentionally, for testing)
- Use this endpoint to generate test tokens for local development
⌘I

