Skip to content

API Reference / API keys

Reveal an API key's secret

Returns an API key's secret after a two-factor step-up in the last 5 minutes. A non-administrator can reveal only their own keys, and the key's owner is emailed. Keys created before secrets were stored cannot be revealed and must be rotated first.

POST/accounts.v1.Accounts/RevealAPIKey

Request body

application/jsonRequired

Request to show an existing API key's secret in the caller's workspace. Requires a two-factor step-up in the last 5 minutes, and a non-administrator can reveal only their own keys.

apiKeyId?string

Opaque 16-byte identifier of the API key to reveal, base64-encoded in JSON.

Format"byte" base64

Response body

application/json

Success

rawKey?string

The key's current secret, sent as a Bearer token in the Authorization header.

curl -X POST "https://api.goldmine.to/accounts.v1.Accounts/RevealAPIKey" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "apiKeyId": "CgsMDQ4PEBESExQVFhcYGQ=="
  }'
{
  "rawKey": "f3f1f2f3f4f5f6f7f8f9fafbfcfdfeff00112233445566778899aabbccddeeff"
}