Account
List accounts
Lists registered accounts
get/v1/accounts
Request
- Base URL: https://your-emailengine-host
- URL: https://your-emailengine-host/v1/accounts
- Auth: HTTP bearer
Query parameters
pageinteger
Page number (zero indexed, so use 0 for first page)
pageSizeinteger
How many entries per page
Example:20
state'init' | 'unset' | 'connected' | 'connecting' | 'syncing' | 'authenticationError' | 'connectError' | 'disconnected' | 'paused'
Filter accounts by state
Example:connected
querystring
Filter accounts by string match
Example:user@example.com
Headers
x-ee-timeoutinteger
Request timeout in milliseconds. Raises the command timeout above the EENGINE_TIMEOUT default for a long-running request; a value below the default has no effect
Example:30000
Response
Returns a page of accounts with their connection states.
Example response
{
"total": 120,
"pages": 24,
"state": "*",
"accounts": [
{
"account": "user123",
"name": "My Email Account",
"email": "user@example.com",
"type": "outlook",
"app": "AAABhaBPHscAAAAH",
"state": "connected",
"webhooks": "https://myservice.com/imap/webhooks",
"proxy": "socks5://proxy.example.com:1080",
"smtpEhloName": "relay.example.com",
"counters": {
"events": {
"messageNew": 30,
"messageDeleted": 5
}
},
"syncTime": "2021-02-17T13:43:18.860Z",
"authFailureDisabledAt": "2021-03-22T13:13:31.000Z",
"lastError": {
"response": "Token request failed for gmail (refresh_token, HTTP 400): invalid_grant - Token has been expired or revoked.",
"description": "Authentication failed",
"serverResponseCode": "OauthRenewError",
"tokenRequest": {
"url": "https://oauth2.googleapis.com/token",
"method": "post",
"grant": "refresh_token",
"provider": "gmail",
"status": 400,
"clientId": "1023289917884-h3nu00e9cb7h252e24c23sv19l8k57ah.apps.googleusercontent.com",
"clientSecret": "GOCSPX...V-Da",
"authority": "common",
"serviceClient": "113328088575113530522",
"signer": "serviceKey",
"googleProjectId": "project-name-425411",
"serviceClientEmail": "service-account@project-name-425411.iam.gserviceaccount.com",
"code": "AAABhaBPHscAAAAH",
"error": "fetch failed",
"errorCode": "ECONNREFUSED",
"flag": {
"message": "Please verify the OAuth2 application credentials",
"code": "INVALID_CLIENT_SECRET",
"url": "https://console.developers.google.com/"
},
"userFlag": {
"message": "The grant for this account has been revoked"
},
"scopes": [
"https://mail.google.com/"
],
"response": {
"error": "invalid_grant",
"error_description": "Bad Request"
}
}
},
"delegationError": "Delegated account was not found"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.