Skip to main content
API keys are the recommended authentication method for Yativo Crypto integrations. They let your server authenticate programmatically without user sessions, and can be scoped to the minimum permissions your integration requires.
2FA must be enabled on your account before you can create API keys. All key management operations require a current TOTP code in the X-2FA-Token header.

Crypto-Relevant Permissions

For most Yativo Crypto server integrations, you’ll want read, write, and transactions at minimum.

Create an API Key

POST /apikey/create
string
required
Current 6-digit TOTP code from your authenticator app.
string
required
A descriptive name (e.g., “Crypto Backend — Production”).
array
required
Array of permission scopes.
number
Days until expiry. Omit for a non-expiring key.
cURL
Response
The api_secret is only shown once. Store it in your secrets manager immediately.

Authenticate with an API Key

Method 1: Exchange for Bearer token (recommended for production)
Use the returned access_token as Authorization: Bearer {token} on all subsequent requests. Refresh it before expiry using the same endpoint. Method 2: Header-based (for simpler integrations)

Server-to-Server Pattern

Here’s a complete server-to-server setup using the Bearer token method with auto-refresh:
Without the SDK:

Key Management

For full endpoint documentation, see the API Keys reference.

Best Practices for Crypto Integrations

Create dedicated API keys for sandbox and production. Never use a production key for testing.
A key used only for reading balances and transaction history should only have read. Only grant transactions to services that actually initiate transfers.
Rotate API secrets periodically (e.g., every 90 days) and immediately if you suspect a key has been exposed. The rotate endpoint generates a new secret without requiring you to delete and recreate the key.
Never hardcode API keys in source code. Use environment variables or a secrets manager and inject at runtime.