Skip to main content

Generating a DreamSolve API Key

This guide walks you through creating and managing API keys for the DreamSolve platform using the Settings page.

Prerequisites

Before generating an API key, you must:

  1. Have a DreamSolve account (sign up using GitHub or Google authentication)
  2. Be logged in to the application

Step 1: Navigate to Settings

  1. Log in to your DreamSolve account at dreamsolve.ai
  2. Click on the Settings option in the menu bar

Step 2: Access API Key Management

In the Settings page, you'll find the API Keys tab:

  1. Click on the API Keys tab
  2. You'll see a list of your existing API keys (if any)

Step 3: Create a New API Key

To create a new API key:

  1. Enter a name for your API key in the input field
  2. Click the Create API Key button
  3. Your new API key will be generated and displayed

Important: Copy your API key immediately after creation. For security reasons, you won't be able to see the full key again.

Step 4: Use Your API Key

Once created, use your API key to authenticate API requests:

curl -X GET \
-H "x-api-key: YOUR_API_KEY" \
https://dreamsolve.ai/api/v1/apiKeys

Include the x-api-key header in all API requests.

Managing Existing API Keys

Delete an API Key

  1. Find the API key you want to delete in the list
  2. Click the Delete button next to the key
  3. Confirm the deletion when prompted

Best Practices

Security Recommendations

  • Keep keys secret: Never share your API keys or commit them to version control
  • Rotate regularly: Periodically create new keys and delete old ones
  • Use environment variables: Store API keys in environment variables, not in code
  • Monitor usage: Regularly review your API keys and remove unused ones

Storing API Keys Safely

For local development, use a .env file:

# .env
DREAMSOLVE_API_KEY=your_api_key_here

Make sure .env is in your .gitignore file to prevent accidental commits.

For production, use your hosting platform's secrets management:

  • Vercel: Environment Variables in project settings
  • AWS: Secrets Manager or Parameter Store
  • Heroku: Config Vars

Troubleshooting

"Invalid API key"

This error appears if your API key is incorrect or has been deleted. Verify you're using the correct key.

"Unauthorized"

Make sure you're logged in and have permission to access the API keys feature.

What's Next?

After generating your API key:

  1. Review the API Overview for general API usage
  2. Check the API Keys endpoint documentation for detailed API reference
  3. Start integrating DreamSolve into your applications