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.). It carries atype: ClassVar[str]— the stable identifier used throughout the platform.is_ready()returnsTruewhen the credentials are valid enough to use — the UI shows this status.BaseIntegration[WeatherAPICredentials]ties the credentials to a display name and icon that appear in workspace control. You do not settypeon the integration — the SDK derives it from the credentials class’stypeautomatically (BaseIntegration.__init_subclass__), so the two can never drift apart.
Register the integration
Update the plugin class:Integration anatomy
Probing readiness against the live API
BaseCredentials.is_ready() only checks that fields are filled in. To make the
“connected” status reflect real authorization, override the integration’s
is_ready classmethod and probe the API — this is what the ClipOne plugin
does:
Credential field types
You can use any NCL display type for credential fields — every widget takes alabel, and secrets should use ConfigPassword so they render masked:
Next: Use Integration in Node →
Wire the integration into your node to call a real API with credentials.