Skip to main content
By the end of this page you’ll call the ego API and list the connections your key can read.
The ego API is in preview. These endpoints aren’t live yet, so the request below won’t return real data. The flow is the one we’re building toward — follow it to see the shape of a call and its response.
1

Get an API key

Create a key in the ego dashboard and copy it. Treat it like a password.
2

Set it in your shell

Export the key so the request can read it:
export EGO_API_KEY="sk_test_your_key_here"
3

List your connections

Call the API with your key as a bearer token:
curl https://api.myego.dev/v1/connections \
  -H "Authorization: Bearer $EGO_API_KEY"
4

Read the response

A successful call returns the connections the key can see. Token material never appears — only the provider, the account, and the scopes you granted:
{
  "data": [
    {
      "id": "conn_4f2a9c",
      "provider": "google",
      "email": "ada@example.com",
      "scopes": ["https://www.googleapis.com/auth/gmail.readonly"],
      "status": "active"
    }
  ]
}

Next steps

Grant scoped access

Connect a source and hand an agent one scope.

API reference

Every endpoint, parameter, and response.