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:
- Have a DreamSolve account (sign up using GitHub or Google authentication)
- Be logged in to the application
Step 1: Navigate to Settings
- Log in to your DreamSolve account at dreamsolve.ai
- 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:
- Click on the API Keys tab
- 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:
- Enter a name for your API key in the input field
- Click the Create API Key button
- 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
- Find the API key you want to delete in the list
- Click the Delete button next to the key
- 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:
- Review the API Overview for general API usage
- Check the API Keys endpoint documentation for detailed API reference
- Start integrating DreamSolve into your applications