connect
Let a user connect their apps, such as Gmail, Slack and Notion, so Bash can work in them. A connect link signs one user in to one app from the catalog. Once they agree, Bash can use that app in their work.
Get a sign-in link for one app
Send link.url to your user.
const traveller = vestra.user('traveller-42'); const link = await traveller.connect('gmail');console.log(link.status, link.url);Connect an app for your company
Your company's own Bash will use it, so open the link yourself.
const sheets = await vestra.connect('google-sheets');console.log(sheets.url);List their apps
You also get the catalog they may pick from.
const apps = await traveller.connect.list();const catalog = await vestra.connect.catalog({ search: 'calendar' });console.log(apps.data.length, catalog.data.length);Disconnect an app
await traveller.connect.remove('con_7hs');Get a sign-in link for one app
Send link.url to your user.
traveller = vestra.user("traveller-42") link = traveller.connect("gmail")print(link.status, link.url)Connect an app for your company
Your company's own Bash will use it, so open the link yourself.
print(vestra.connect("google-sheets").url)List their apps
You also get the catalog they may pick from.
apps = traveller.connect.list()catalog = vestra.connect.catalog(search="calendar")print(len(apps.data), len(catalog.data))Disconnect an app
traveller.connect.remove("con_7hs")Get a sign-in link for one app
Send it to your user.
vestra connect gmail --user traveller-42List their apps
You can also list every app they may connect.
vestra connect --user traveller-42vestra connect --catalog --search calendarDisconnect an app
vestra connect --remove con_7hs --user traveller-42Get a sign-in link for one app
It is for one user: send them its url.
curl "$VESTRA_BASE_URL/v1/connections" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "user_id": "traveller-42", "app": "gmail" }'List their apps
You can also list the catalog your users may pick from.
curl "$VESTRA_BASE_URL/v1/connections?user_id=traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY" curl "$VESTRA_BASE_URL/v1/apps?search=calendar" \ -H "Authorization: Bearer $VESTRA_API_KEY"Disconnect an app
user_id says whose connection it is.
curl -X DELETE "$VESTRA_BASE_URL/v1/connections/con_7hs?user_id=traveller-42" \ -H "Authorization: Bearer $VESTRA_API_KEY"{ "method": "tools/call", "params": { "name": "connect", "arguments": { "user": "traveller-42", "app": "gmail" } }}Good to know
When Bash needs an app during a job
If Bash needs an app during a job, it sends an interaction of type connect: a request that waits for an answer. Send your user its link, or answer { approve: false } to decline.
After the user agrees
Once your user agrees, they are sent to your return_url, or to your company's first allowed return URL. Your webhooks receive connection.completed or connection.failed, so you know how it went.
Which apps users can connect
GET /v1/apps lists the apps your users may connect, with your company's allowlist applied.
The routes behind connect6 routes, each with every field in the API reference
runtime (or all)runtime (or all)runtime (or all)runtime (or all)