Connected apps
The apps each user connects through a sign-in link, and the apps they may choose from.
GET/v1/connectionsThe connected apps of one user (user_id), or of the company's own Bash.
Request3 fields
Query
limitintegerHow many items per page, 1 to 100. Default 20.
- Type
integer
cursorstringWhere to go on from: the next_cursor of the page before, unchanged. Absent: the first page.
- Type
string
user_idstringWhose Bash: your id for the user. Absent: your company's own Bash.
- Type
string
Answers 2002 fields
dataobject[]The items on this page.
object"connection"Always connection.
- Type
"connection"
idstringThe connection's id.
- Example
con_8f2k
user_idstring | nullYour id for the user; null for your company's own Bash.
- Type
string | null
appstringThe app, by its slug.
- Example
gmail
status"active" | "pending" | "initializing" | "expired" | "revoked" | "inactive" | "failed"active: Bash can use it. pending or initializing: the sign-in is not finished. expired, revoked, inactive or failed: it no longer works, and the user connects it again.
- Type
"active" | "pending" | "initializing" | "expired" | "revoked" | "inactive" | "failed"
labelstring | nullThe account's label, usually its email; null when the app gives none.
- Type
string | null
created_atstringWhen it was connected, as an ISO 8601 date and time in UTC.
- Type
string
next_cursorstring | nullSend it as cursor for the next page; null on the last page.
- Type
string | null
const connections = await vestra.connect.list();connections = vestra.connect.list()vestra connect# Get 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" } }}