Get RSA Key
curl --request GET \
--url https://sandbox-api.cardcore.cloud/util/rsa-keyimport requests
url = "https://sandbox-api.cardcore.cloud/util/rsa-key"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox-api.cardcore.cloud/util/rsa-key', 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://sandbox-api.cardcore.cloud/util/rsa-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.cardcore.cloud/util/rsa-key"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.cardcore.cloud/util/rsa-key")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.cardcore.cloud/util/rsa-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "RSA Key Generated Successfully",
"data": {
"keyIndex": "4b2b5665-c7cc-4cfb-847a-a70845647d8f",
"keyType": "DER",
"publicKeyFingerprint": "6b3e087b12e500463840c44d37a169467fc3cd38ddd75d77000bfd9d34ee95d8",
"publicKey": "3082010a0282010100c208eec5705d1a2d77350e57cbed88498be1fc8deb19925fbbe745e94e3b5da79690e97ea7e76015a102d9792990d9bfe6ef9547f634c26a35a15656d6ff5a6f5a70a3b691dc57992a2f1b6b23739be8d1b2882b5dd5b9f39ffcac971c80458e6f491db5e251fb205df56e90465af665461b4888f4d419af3782415090ed661cbb059c265226154bbe2a14e98deca794d8c80ca0a0e2115c566859ee41d32dff6f9076df82a1ea159135bd46c1de0852bb444beebdffbac43fda13bc0ee42321ac9e17deb254b054f2f14e854648119078341382205d56dcab7790284a43874f5d4eff81bbad544660e9f3fa62153631ecd92cbe7903be9737de862a0bf9ba910203010001",
"publicKeyLength": 2048,
"privateKeyLength": "0656"
}
}Utility
Get RSA Key
Fetch RSA key data used in card-related encryption flows. Use this endpoint to retrieve the public key and fingerprint required to build the defaultPIN object for your environment.
GET
/
util
/
rsa-key
Get RSA Key
curl --request GET \
--url https://sandbox-api.cardcore.cloud/util/rsa-keyimport requests
url = "https://sandbox-api.cardcore.cloud/util/rsa-key"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox-api.cardcore.cloud/util/rsa-key', 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://sandbox-api.cardcore.cloud/util/rsa-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.cardcore.cloud/util/rsa-key"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-api.cardcore.cloud/util/rsa-key")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.cardcore.cloud/util/rsa-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "RSA Key Generated Successfully",
"data": {
"keyIndex": "4b2b5665-c7cc-4cfb-847a-a70845647d8f",
"keyType": "DER",
"publicKeyFingerprint": "6b3e087b12e500463840c44d37a169467fc3cd38ddd75d77000bfd9d34ee95d8",
"publicKey": "3082010a0282010100c208eec5705d1a2d77350e57cbed88498be1fc8deb19925fbbe745e94e3b5da79690e97ea7e76015a102d9792990d9bfe6ef9547f634c26a35a15656d6ff5a6f5a70a3b691dc57992a2f1b6b23739be8d1b2882b5dd5b9f39ffcac971c80458e6f491db5e251fb205df56e90465af665461b4888f4d419af3782415090ed661cbb059c265226154bbe2a14e98deca794d8c80ca0a0e2115c566859ee41d32dff6f9076df82a1ea159135bd46c1de0852bb444beebdffbac43fda13bc0ee42321ac9e17deb254b054f2f14e854648119078341382205d56dcab7790284a43874f5d4eff81bbad544660e9f3fa62153631ecd92cbe7903be9737de862a0bf9ba910203010001",
"publicKeyLength": 2048,
"privateKeyLength": "0656"
}
}Query Parameters
When true, requests long-lived key material.
Response
200 - application/json
Get RSA Key completed successfully.
The response is of type object.