Get API key
Get an API key by ID. Note: These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin.
GET
/
cosigners
/
{cosignerId}
/
api_keys
/
{apiKeyId}
TypeScript
const response: Promise<FireblocksResponse<ApiKey>> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);CompletableFuture<ApiResponse<ApiKey>> response = fireblocks.cosignersBeta().getApiKey(cosignerId, apiKeyId);response = fireblocks.cosigners_beta.get_api_key(cosigner_id, api_key_id);curl --request GET \
--url https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}const options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}', 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.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}",
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://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}")
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{
"id": "44fcead0-7053-4831-a53a-df7fb90d440f",
"lastSeen": "2021-07-01T00:00:00.000Z",
"callbackHandler": {
"url": "https://example.com/callback-handler",
"publicKey": "-----BEGIN PUBLIC KEY-----\n... truncated ...\n-----END PUBLIC KEY-----",
"certPublicKeyHash": "<string>"
}
}{
"message": "<string>",
"code": 123
}Path Parameters
The unique identifier of the cosigner
The unique identifier of the API key
Was this page helpful?
Previous
Pair API keyPair an API key to a cosigner
Endpoint Permission: Admin and Non-Signing Admin.
Next
⌘I
TypeScript
const response: Promise<FireblocksResponse<ApiKey>> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);CompletableFuture<ApiResponse<ApiKey>> response = fireblocks.cosignersBeta().getApiKey(cosignerId, apiKeyId);response = fireblocks.cosigners_beta.get_api_key(cosigner_id, api_key_id);curl --request GET \
--url https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}const options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}', 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.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}",
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://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/cosigners/{cosignerId}/api_keys/{apiKeyId}")
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{
"id": "44fcead0-7053-4831-a53a-df7fb90d440f",
"lastSeen": "2021-07-01T00:00:00.000Z",
"callbackHandler": {
"url": "https://example.com/callback-handler",
"publicKey": "-----BEGIN PUBLIC KEY-----\n... truncated ...\n-----END PUBLIC KEY-----",
"certPublicKeyHash": "<string>"
}
}{
"message": "<string>",
"code": 123
}