Get the user a link to sign Bowmark in to a site
add_connectionGet a sign-in link for one site, so the user can sign Bowmark in to it right now, before any run needs it. Pass the site as a domain (youtube.com), a URL, or a provider id. Call this whenever the user asks to log in, sign in, connect or link an account on a site — never send them to the Bowmark Link extension or the dashboard to do it themselves.
It returns url, a single-use link that expires (expiresAt). Give the user that URL and say which site it is for. On that page they sign in with Bowmark's own browser, or, in desktop Chrome with Bowmark Link installed, press "Use Chrome extension" to send the login that Chrome already holds. Then call wait_for_sign_in with the returned ref: it answers the moment they finish, and every later run uses the new login.
When Bowmark cannot sign in to that site, it says so and returns sites, the sites it can sign in to. Tell the user plainly. Do not offer a workaround that asks for their password. A public page on that site still works without a login: get_library shows what can read it.
To sign back in to a saved login that stopped working, pass its id from list_connections as connection. The fresh session goes into the SAME id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The site to sign in to: a domain (`youtube.com`), a URL, its name, or a provider id. | |
| connection | No | Optional. The `id` of a saved login from `list_connections`, to sign back in to it. |