Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

List connected accounts

GET/api/v1/connected_accounts

Lists the connected accounts in the environment, filtered by connection, identifier, provider or organization, with each account's status. The list doesn't include credentials; use Get a connected account's credentials for one account. Use next_page_token to get the next page.

Authorization

Authorization: Bearer $TOKEN, an access token from the client credentials grant. See Authentication.

Query parameters

connection_namesarray of string
Filter by one or more connection names (exact match). Returns connected accounts belonging to any of the specified connections. Max 20 names per request. Cannot be combined with the connector field.
connectorstring
The connection name, as shown in AgentKit > Connections.
identifierstring
Your app's ID for the user, the same value you used when the user connected. Use a stable internal ID, not an email address.
is_org_wide_credentialboolean
Set to true to return only the shared credential of an org-wide connection, or false to return only users' own accounts. Omit it to return both.
organization_idstring
Filter by organization ID. Returns only connected accounts associated with this organization.
page_sizeinteger
Maximum number of connected accounts to return, up to 99. Defaults to 10 when omitted or 0.
page_tokenstring
Pagination token from a previous response. Use the next_page_token value from ListConnectedAccountsResponse to fetch the next page.
providerstring
Return only accounts for this app, such as GMAIL or SLACK. Exact match, in capitals as the account's provider shows it.
querystring
Text search query to filter connected accounts by name, identifier, or other searchable fields. Case-insensitive.
user_idstring
Filter by user ID. Returns only connected accounts associated with this user.

Response 200

connected_accountsarray of object
List of connected accounts matching the filter criteria. Excludes sensitive authorization details for security.
Show 11 child attributes
authorization_typestring (enum)
Authorization mechanism type.
OAUTHAPI_KEYBASIC_AUTHBEARER_TOKENCUSTOMBASICOAUTH_M2MTRELLO_OAUTH1GOOGLE_DWDTRUSTED_IDPSMART_FHIRNO_AUTH
connection_idstring
Parent connection configuration reference.
connectorstring
The connection name, as shown in AgentKit > Connections.
idstring
Unique connected account identifier.
identifierstring
Your app's ID for the user, the value passed when the account was created.
is_org_wide_credentialboolean
Whether this is the shared credential of an org-wide connection, which every user's tool calls on that connection use. false for a user's own account.
last_used_atstring
Last usage timestamp.
providerstring
The app the account connects to, such as GMAIL or SLACK.
statusstring (enum)
Current connection status.
ACTIVEEXPIREDPENDING_AUTHPENDING_VERIFICATIONDISCONNECTED
token_expires_atstring
Token expiration timestamp.
updated_atstring
Last modification timestamp.
next_page_tokenstring
Pagination token for retrieving the next page. Empty if this is the last page. Pass this value to page_token in the next request.
prev_page_tokenstring
Pagination token for retrieving the previous page. Empty if this is the first page. Pass this value to page_token to go back.
total_sizeinteger
Total count of connected accounts matching the filter criteria across all pages. Use for calculating pagination.

Errors

Every error has the same body: code, message and details. See Errors and rate limits.

400Invalid request - occurs when query parameters are malformed or validation fails
401Authentication required - missing or invalid access token

Used in