Select a plugin release and inspect its connection requirements and profiles. Reuse an applicable existing connection. Otherwise prepare connection.json:
All following paths are relative to the Product API Endpoint. id identifies the same connection. When an attempt ID exists, retain attempt_id returned by authorization. Authorization state does not guarantee this field is returned.
JSON expected_generation from authorization status; inspect again afterward.
Continue according to grant. browser_handoff opens a product browser page for authorization; attempt_id is empty in that response. Open authorization_url, then reread authorization state. Do not poll with an empty ID. If device_code, managed_session, or another mode returns a valid attempt ID, retain it. Use user_code when required and honor poll_after and the total waiting limit.
After interruption, use the saved attempt ID together with current status. An absent attempt_id in status does not prove that the original attempt expired. If the connection version changes, stop using the old attempt and review the current connection and authorization; do not reuse that attempt with a replacement version. Display names are not authorization identifiers.
After account authorization, bind the connection and authorization profile to the corresponding plugin installation connection requirement, then read the installation result. For actual invocation examples, see the SDK guide Connect Plugin Accounts and the CLI guide Messaging Channels and Plugins.