This is part 3 of the Your First Plugin tutorial. Make sure you’ve completed 2. First Node first.
Define credentials and integration
Add toweather_plugin/__init__.py:
How it works
BaseCredentialsis a Pydantic model that defines the fields users fill in (API keys, tokens, URLs, etc.)is_ready()returnsTruewhen the credentials are valid enough to use — the UI shows this statusBaseIntegrationties the credentials to a display name and icon that appear in workspace settingstypemust match between the credentials class and the integration class — this is the identifier used throughout
Register the integration
Update the plugin class:Integration anatomy
| Component | Purpose |
|---|---|
type | Unique identifier for this integration (string) |
display_name | Human-readable name shown in the UI |
image | Icon URL for the integration tile |
credentials_class | Pydantic model (auto-set from the generic parameter) |
is_ready() | Validation — returns True when credentials are usable |
scopes | Optional list of permission scopes (for OAuth-style integrations) |
properties | Optional dict of extra metadata |
Credential field types
You can use any NCL display type for credential fields:Next: Use Integration in Node →
Wire the integration into your node to call a real API with credentials.