What are Credentials?
Credentials in Atomemo plugins are:- User-provided authentication data (API keys, tokens, passwords)
- Validated and stored securely by the Hub Server
- Passed to tools that require authentication
- Optional authentication logic via the
authenticatemethod
Basic Credential Definition
Credential Structure
Required Fields
| Field | Type | Description |
|---|---|---|
name | string | Unique identifier (kebab-case) |
display_name | Record<Locale, string> | Human-readable name |
description | Record<Locale, string> | What this credential is for |
icon | string | Visual identifier (emoji/icon) |
parameters | Parameter[] | Input fields for credential data |
Optional Fields
| Field | Type | Description |
|---|---|---|
authenticate | Function | Custom validation logic |
help_url | string | Link to credential setup docs |
extra | Record<string, any> | Additional metadata |
Parameter Types
Credentials can have multiple parameters with different types:String Parameter
Secret Parameter
Number Parameter
Boolean Parameter
Custom Authentication
Implement theauthenticate method to validate credentials:
Authentication Flow
When a user provides credentials:Real-World Examples
Example 1: Simple API Key
Example 2: Username and Password
Example 3: OAuth with Refresh Token
Error Handling
Handle authentication errors gracefully:Best Practices
Always mark sensitive data as secret
Always mark sensitive data as secret
Provide helpful descriptions
Provide helpful descriptions
Validate credential format
Validate credential format
Test credentials during authentication
Test credentials during authentication
Make a simple API call to verify credentials work:
Return useful metadata
Return useful metadata
Next Steps
Add Tools
Create tools that use your credentials
Tool Definition
API reference for tools