# Authentication BlockBee uses a simple API key authentication system. You can send your API key in two ways: ## API Key Types BlockBee offers two types of API keys to serve different use cases: ### API Key V1 - Basic Receiving - **Purpose**: Simple payment receiving within BlockBee - **Use Case**: Basic API access for straightforward payment receiving - **Security**: Secure yet simple - no direct fund control - **Recovery**: Safe to reset without risk of losing funds ### API Key V2 - Self-Custodial Wallet - **Purpose**: Automated payouts and advanced fund management - **Use Case**: Self-custodial wallet for automated sending to multiple addresses - **Security**: Advanced cryptography with recovery key feature - **Recovery**: Recovery key required to regenerate API Key V2 - **Required for**: Self-Custodial Wallet operations > **WARNING** >**Critical:** If you lose both the API Key V2 and Recovery Key, you will permanently lose access to your Self-Custodial Wallet ## When to Upgrade to API Key V2 **Upgrade to API Key V2 if:** - Automated payouts are essential for your operations - You need to send payments to multiple addresses automatically - You want the added security and flexibility of Self-Custodial Wallet **Stay with API Key V1 if:** - You only need basic payment receiving functionality - You don't require automated payout features ## Getting Your API Key Your API key is provided by the BlockBee Dashboard. If you don't have one yet, [get your API key here](https://dash.blockbee.io/). ## Authentication Methods ### Method 1: GET Parameter Add your API key as a `apikey` parameter to your request URL: ```bash https://api.blockbee.io/btc/create?apikey=YOUR_API_KEY&amount=100¤cy=USD ``` ### Method 2: Header Send your API key in the `apikey` header: ```bash curl -X GET "https://api.blockbee.io/btc/create?amount=100¤cy=USD" \ -H "apikey: YOUR_API_KEY" ``` ## Security Best Practices - **Keep your API key secure** - Never expose it in client-side code or public repositories - **Use HTTPS** - Always make requests over HTTPS in production - **Rotate regularly** - Consider rotating your API key periodically for enhanced security > **WARNING** >**API Key V2 Recovery** - **CRITICAL:** Safely store both your API Key V2 and Recovery Key. If you lose both, you will permanently lose access to your Self-Custodial Wallet as BlockBee cannot access it without these keys ## Example Request Here's a complete example using the header method: ```javascript const response = await fetch('https://api.blockbee.io/btc/create?amount=100¤cy=USD', { headers: { 'apikey': 'YOUR_API_KEY' } }); ``` That's it! Your API key is all you need to authenticate with BlockBee.