Skip to main content
GET
/
connected-accounts
import requests

response = requests.get(
    'https://api.usedari.com/connected-accounts',
    headers={
        'X-API-Key': 'YOUR_API_KEY'
    }
)

accounts = response.json()
print(f"Found {len(accounts)} connected accounts")
for account in accounts:
    print(f"- {account['oauth_app_id']}: {account['oauth_user_name']}")
[
  {
    "id": "oauth_123456789",
    "user_id": "user_987654321",
    "oauth_app_id": "google",
    "oauth_user_name": "user@gmail.com"
  },
  {
    "id": "oauth_234567890",
    "user_id": "user_987654321",
    "oauth_app_id": "github",
    "oauth_user_name": "johndoe"
  }
]
This endpoint allows you to retrieve a list of all OAuth-connected accounts linked to your account. These accounts represent third-party services you’ve authorized via OAuth (e.g., Gmail).

Headers

X-API-Key
string
required
Your API key for authentication

Response Fields

id
string
The unique identifier of the connected account
user_id
string
The ID of the user who owns this connected account
oauth_app_id
string
The identifier of the OAuth application/service (e.g., “gmail”)
oauth_user_name
string
The username or display name associated with this OAuth account
import requests

response = requests.get(
    'https://api.usedari.com/connected-accounts',
    headers={
        'X-API-Key': 'YOUR_API_KEY'
    }
)

accounts = response.json()
print(f"Found {len(accounts)} connected accounts")
for account in accounts:
    print(f"- {account['oauth_app_id']}: {account['oauth_user_name']}")
[
  {
    "id": "oauth_123456789",
    "user_id": "user_987654321",
    "oauth_app_id": "google",
    "oauth_user_name": "user@gmail.com"
  },
  {
    "id": "oauth_234567890",
    "user_id": "user_987654321",
    "oauth_app_id": "github",
    "oauth_user_name": "johndoe"
  }
]

Usage Notes

  • API Key: Get your API key from the Dari dashboard
  • OAuth Accounts: Only returns accounts associated with the authenticated user
  • Authorization: These accounts can be used by workflows to access authorized services
  • Security: OAuth tokens are never returned, only account metadata

Error Responses

{
  "detail": "Invalid API key"
}
{
  "detail": "Failed to retrieve connected accounts"
}