Authentication overview

Blockchain.com provides authentication mechanisms to secure both user-facing wallet services and programmatic access to its data and trading APIs. For individual users accessing their wallets, authentication typically involves a combination of a user-defined password and a second factor, such as a time-based one-time password (TOTP) or SMS code. This multi-factor approach is designed to protect digital assets from unauthorized access. For developers requiring programmatic access to blockchain data via the Blockchain.com Explorer API, authentication relies on API keys. These keys are used to identify and authorize requests, ensuring that only authorized applications can retrieve specific data or perform actions within defined permissions. The specific authentication method employed depends on the service being accessed and the nature of the interaction, ranging from simple data queries to complex trading operations on the exchange platform.

The core principle behind Blockchain.com's authentication strategy is to maintain the integrity and security of user accounts and the underlying blockchain data. For API access, keys are typically associated with specific accounts and may have varying levels of permissions, limiting potential exposure in case of compromise. Wallet authentication prioritizes user control and asset protection through robust login procedures and optional advanced security features. Understanding the appropriate authentication method for each use case is critical for secure and effective interaction with the Blockchain.com ecosystem.

Supported authentication methods

Blockchain.com implements distinct authentication methods tailored to the specific context of use:

  • API Key authentication: Primarily used for programmatic access to the Blockchain.com Explorer API. This method involves generating a unique API key from the user's account dashboard. The key is then included in the headers or query parameters of API requests to authenticate the calling application. API keys are suitable for server-to-server communication or applications that require read-only access to public blockchain data.
  • Password and Two-Factor Authentication (2FA): This is the standard method for user login to the Blockchain.com Wallet and Exchange platforms. Users set a strong password, and it is highly recommended to enable 2FA for an additional layer of security. 2FA typically involves using an authenticator app (like Google Authenticator) to generate a time-sensitive code or receiving a code via SMS or email, which must be entered in addition to the password.
  • OAuth 2.0 (for specific integrations): While not universally applied across all Blockchain.com services, OAuth 2.0 may be utilized for specific third-party integrations or partner applications to grant limited access to user resources without sharing direct credentials. This method allows users to authorize applications to act on their behalf with specific permissions, enhancing security and user control. OAuth 2.0 is a widely adopted authorization framework for delegating access to protected resources, as detailed by the OAuth 2.0 specification.

The choice of authentication method depends on the nature of the interaction and the level of access required. Developers building applications that query public blockchain data will primarily use API keys, while individual users managing their cryptocurrency holdings will rely on password and 2FA for wallet access.

Authentication Method Comparison

Method When to Use Security Level
API Key Programmatic access to Blockchain Explorer data, read-only operations. Moderate (depends on key management and permissions).
Password + 2FA User login to Blockchain Wallet, Exchange, and sensitive account actions. High (combines something you know with something you have).
OAuth 2.0 Third-party integrations requiring delegated access to user resources. High (token-based, granular permissions, no direct credential sharing).

Getting your credentials

The process for obtaining authentication credentials varies based on whether you need API access or user wallet access:

For API Keys (Blockchain Explorer API)

  1. Create a Blockchain.com Account: If you don't already have one, sign up for a free Blockchain.com account on their homepage.
  2. Verify Your Account: Complete any necessary identity verification steps. While the Blockchain Explorer API often allows basic access without full KYC, certain endpoints or higher rate limits may require it.
  3. Navigate to API Settings: Log in to your Blockchain.com account. Look for a section related to 'API' or 'Developer Settings' within your account dashboard. The exact path may vary, but it is typically found under 'Settings' or 'Profile'.
  4. Generate New API Key: Within the API settings, you should find an option to generate a new API key. Follow the prompts, which may include naming your key for easier management.
  5. Record Your API Key: Once generated, the API key will usually be displayed only once. It is crucial to copy and store this key securely, as you may not be able to retrieve it again. If lost, you will need to generate a new one.
  6. Configure Permissions (if applicable): Some API keys may allow you to configure specific permissions or scopes, limiting what the key can access or do. Assign the minimum necessary permissions for your application's needs.

For Wallet and Exchange Access (Password and 2FA)

  1. Create Wallet: Register for a new Blockchain.com Wallet on their website or mobile application.
  2. Set Strong Password: During registration, you will be prompted to create a password. Choose a strong, unique password that combines uppercase and lowercase letters, numbers, and symbols.
  3. Enable Two-Factor Authentication (2FA): Immediately after setting up your wallet, navigate to the 'Security Center' or 'Settings' within your wallet dashboard. Locate the 2FA option and enable it. Blockchain.com typically supports authenticator apps (like Google Authenticator or Authy) for TOTP codes. Follow the on-screen instructions to link your authenticator app by scanning a QR code.
  4. Store Recovery Phrase: During wallet setup, you will receive a 12-word recovery phrase (also known as a seed phrase). This phrase is critical for recovering your wallet if you lose your password or device. Write it down offline and store it in a secure, private location. Blockchain.com's support documentation provides guidance on securely storing your recovery phrase.

Authenticated request example

For the Blockchain Explorer API, authentication typically involves including your API key in the request. While the exact method (header or query parameter) can vary by endpoint, a common pattern is to include it as a query parameter or an X-API-Token header. Refer to the specific API documentation for precise instructions on each endpoint.

Here's an example using curl to query Bitcoin block details, assuming the API key is passed as a query parameter:

curl -X GET \
  "https://api.blockchain.com/v3/explorer/blocks/latest?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json"

In this example:

  • YOUR_API_KEY should be replaced with the actual API key you generated from your Blockchain.com account.
  • The request targets the /v3/explorer/blocks/latest endpoint to retrieve information about the most recent Bitcoin block.
  • The -H "Content-Type: application/json" header indicates that the client expects a JSON response.

Always consult the official Blockchain.com API documentation for the most up-to-date endpoint URLs, required parameters, and authentication methods for specific API calls.

Security best practices

Maintaining strong security practices is paramount when interacting with Blockchain.com services, whether through the API or directly via your wallet. Adhering to these guidelines reduces the risk of unauthorized access and loss of assets:

For API Key Management:

  • Keep API Keys Confidential: Treat your API keys like passwords. Never hardcode them directly into client-side code, commit them to public version control systems (e.g., GitHub), or expose them in publicly accessible environments.
  • Use Environment Variables: Store API keys in environment variables on your server or in secure configuration files. This prevents them from being directly visible in your codebase.
  • Implement Least Privilege: If your API key allows for granular permissions, configure it with only the minimum necessary access required for your application's functionality. Avoid granting broad permissions if only read access is needed.
  • Regularly Rotate Keys: Periodically generate new API keys and revoke old ones. This practice limits the window of exposure for any potentially compromised key.
  • Monitor API Usage: Keep an eye on your API usage patterns. Unusual activity or spikes could indicate unauthorized use of your key.
  • Secure Your Server: Ensure the server or environment where your API key is stored and used is itself secured with strong access controls and regular security updates.

For Wallet and Account Security:

  • Enable Two-Factor Authentication (2FA): This is arguably the most critical step for wallet security. Use an authenticator app (TOTP) rather than SMS-based 2FA, as SMS can be vulnerable to SIM swap attacks. The FIDO Alliance promotes strong authentication standards that often include hardware security keys for even greater protection.
  • Use a Strong, Unique Password: Create a complex password that is unique to your Blockchain.com account. Avoid reusing passwords from other services. Consider using a reputable password manager.
  • Secure Your Recovery Phrase: Your 12-word recovery phrase is the master key to your wallet. Write it down offline (not digitally) and store it in multiple secure, physical locations where it cannot be lost, stolen, or damaged. Never share it with anyone.
  • Beware of Phishing: Always verify the URL before entering your login credentials. Phishing attempts often use fake websites that mimic legitimate services. Ensure you are on https://www.blockchain.com.
  • Keep Software Updated: Ensure your operating system, web browser, and any mobile apps are always up to date to protect against known vulnerabilities.
  • Avoid Public Wi-Fi for Sensitive Transactions: Public Wi-Fi networks can be unsecure and susceptible to eavesdropping. Conduct sensitive transactions only on trusted, private networks.
  • Monitor Account Activity: Regularly review your transaction history and login activity for any suspicious entries. Report unauthorized activity immediately to Blockchain.com support.