Get public key to encrypt connected account credentials
Returns the RSA public key used to encrypt the creds field before calling POST /connected_accounts.
The key is a singleton resource scoped to the connected-accounts credentials domain — there is one per tenant context.
Note: This endpoint is currently in beta and might be subject to changes.
GET
/
connected_accounts
/
credentials
/
public_key
TypeScript
const response: Promise<FireblocksResponse<GetConnectedAccountsCredentialsPublicKeyResponse>> = fireblocks.connectedAccountsBeta.getConnectedAccountsCredentialsPublicKey();CompletableFuture<ApiResponse<GetConnectedAccountsCredentialsPublicKeyResponse>> response = fireblocks.connectedAccountsBeta().getConnectedAccountsCredentialsPublicKey();response = fireblocks.connected_accounts_beta.get_connected_accounts_credentials_public_key();curl --request GET \
--url https://api.fireblocks.io/v1/connected_accounts/credentials/public_keyconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/connected_accounts/credentials/public_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://api.fireblocks.io/v1/connected_accounts/credentials/public_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://api.fireblocks.io/v1/connected_accounts/credentials/public_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))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/connected_accounts/credentials/public_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{
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----"
}{
"message": "<string>",
"code": 123
}Response
Public key retrieved successfully.
RSA public key (PEM) used to encrypt credential payloads sent to POST /connected_accounts.
Example:
"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----"
Was this page helpful?
⌘I
TypeScript
const response: Promise<FireblocksResponse<GetConnectedAccountsCredentialsPublicKeyResponse>> = fireblocks.connectedAccountsBeta.getConnectedAccountsCredentialsPublicKey();CompletableFuture<ApiResponse<GetConnectedAccountsCredentialsPublicKeyResponse>> response = fireblocks.connectedAccountsBeta().getConnectedAccountsCredentialsPublicKey();response = fireblocks.connected_accounts_beta.get_connected_accounts_credentials_public_key();curl --request GET \
--url https://api.fireblocks.io/v1/connected_accounts/credentials/public_keyconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/connected_accounts/credentials/public_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://api.fireblocks.io/v1/connected_accounts/credentials/public_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://api.fireblocks.io/v1/connected_accounts/credentials/public_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))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/connected_accounts/credentials/public_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{
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----"
}{
"message": "<string>",
"code": 123
}