Back to Documentation

Authentication

Secure your API requests with API keys and authentication tokens

API Keys

The Solid API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard under Settings → API Keys.

Keep your keys secure

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, etc.

Key Types

sk_live_...PRODUCTION

Live keys - Use these in production. Real charges, real customers, real money.

sk_test_...TESTING

Test keys - Safe for development. No real charges, no real money.

pk_live_...PUBLIC

Publishable keys - Safe to use in client-side code. Limited permissions.

Authentication Header

All API requests must include your API key in the Authorization header:

Header
Authorization: Bearer sk_live_your_api_key_here
Authentication is required

Requests without authentication will return a 401 Unauthorized error.

Code Examples

JavaScript / Node.js

const solid = new Solid({
  apiKey: process.env.SOLID_API_KEY
});

const payment = await solid.payments.create({
  amount: 5000,
  currency: 'usd'
});

Python

import solid

solid.api_key = 'sk_live_your_api_key_here'

payment = solid.Payment.create(
    amount=5000,
    currency='usd'
)

cURL

curl https://api.solidnumber.com/v1/payments \
  -H "Authorization: Bearer sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000,
    "currency": "usd"
  }'

How to Get Your API Keys

  1. 1Log in to your Solid dashboard at app.solidnumber.com
  2. 2Navigate to Settings → API Keys
  3. 3Click Create New API Key
  4. 4Copy your key immediately - you will not see it again!
  5. 5Store it securely in your environment variables

Security Best Practices

  • Use environment variables - Never hardcode API keys in your source code
  • Rotate keys regularly - Generate new keys periodically and retire old ones
  • Use test keys in development - Only use live keys in production environments
  • Limit key permissions - Create separate keys with minimal permissions for different services
  • Monitor API usage - Set up alerts for unusual activity or unexpected API calls

Next Steps

Now that you have your API keys set up, explore our API documentation to start building:

Solid# - AI-Powered Business Management Platform | Payments 3.0