API Keys
This guide explains how to generate and manage API keys in Codesphere.
Navigating to API Keys
API keys are managed within your user settings.
- Click on your Profile Picture in the top-right corner.
- Select User Settings.
- Navigate to the API Keys tab in the left-hand sidebar.
Creating a New API Key
API keys allow external applications to interact with Codesphere on your behalf.
- In the API Keys section, click the Add New Key button.
- Give your key a Name (e.g., "GitHub Actions" or "Local Development") to help you remember its purpose.
- Click Create.
- Copy your key immediately. For security reasons, the key will only be shown once. If you lose it, you will need to regenerate it.
Important Note About Access Levels
Currently, an API key granted to your account will have the same level of access and permissions as your user account itself. Support for fine-grained access tokens (scopes) is on our roadmap and will be added in the future.
Have a feature request? Help us shape the future of Codesphere. You can request new features or vote on the community roadmap at feedback.codesphere.com.
Regenerating an API Key
- Find the specific key in your API Keys list.
- Click the Regenerate (circular arrow) icon next to the key name.
- Confirm the action in the pop-up window.
- Update your applications: The old key will be invalidated instantly, and you must replace it with the new key in your code or environment variables.
Frequently Asked Questions
-
How many keys can I have?
You can generate as many keys as you want. -
What happens if I delete a key?
Any application using that key will immediately receive a 401 Unauthorized error when attempting to connect. -
Can I restrict a key to Read-Only?
Not yet. Currently, all keys inherit your full account permissions.