Get account info
Returns stored information about the account. Credentials are masked: stored passwords, the credentials in any proxy or webhook URL, and the values of custom webhook headers all read back as "******". A masked value is not the stored one - leave the field out of an update rather than writing it back, otherwise the mask replaces the credential.<br/><br/>Quota reporting is not available for Gmail API or MS Graph accounts; the quota field is returned as false for those, the same value an IMAP server without QUOTA support produces.
Request
- Base URL: https://your-emailengine-host
- URL: https://your-emailengine-host/v1/account/{account}
- Auth: HTTP bearer
Path parameters
Unique identifier for the email account
Query parameters
If true, then include quota information in the response
Headers
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
Response
Returns the account configuration, connection state and sync status.
Example response
{
"account": "user123",
"name": "My Email Account",
"email": "user@example.com",
"expectedEmail": "user@example.com",
"copy": true,
"notifyFrom": "2021-07-08T07:06:34.336Z",
"path": [
"*"
],
"imapIndexer": "full",
"authFailureDisabledAt": "2021-03-22T13:13:31.000Z",
"subconnections": [
"[Gmail]/Spam",
"\\Sent"
],
"webhooks": "https://myservice.com/imap/webhooks",
"proxy": "socks5://proxy.example.com:1080",
"smtpEhloName": "relay.example.com",
"imap": {
"auth": {
"user": "myuser@gmail.com",
"pass": "verysecret"
},
"secure": true,
"tls": {
"rejectUnauthorized": true,
"minVersion": "TLSv1.2"
},
"resyncDelay": 900,
"host": "imap.gmail.com",
"port": 993,
"sentMailPath": "Sent Mail",
"draftsMailPath": "Drafts",
"junkMailPath": "Junk",
"trashMailPath": "Trash",
"archiveMailPath": "Archive"
},
"smtp": {
"auth": {
"user": "myuser@gmail.com",
"pass": "verysecret"
},
"host": "smtp.gmail.com",
"port": 587,
"tls": {
"rejectUnauthorized": true,
"minVersion": "TLSv1.2"
}
},
"oauth2": {
"redirectUrl": "https://myapp/account/settings.php",
"provider": "AAABhaBPHscAAAAH",
"auth": {
"user": "user@outlook.com",
"delegatedUser": "shared.mailbox@outlook.com",
"delegatedAccount": "user123"
},
"accessToken": "ya29.a0ARrdaM8a...",
"refreshToken": "1//09Ie3CtORQYm...",
"expires": "2021-03-22T13:13:31.000Z",
"scope": [
"https://mail.google.com/"
],
"tokenType": "Bearer",
"generated": "2021-03-22T13:13:31.000Z",
"refreshTokenGenerated": "2021-03-22T13:13:31.000Z"
},
"state": "connected",
"smtpStatus": {
"created": "2021-07-08T07:06:34.336Z",
"response": "250 OK",
"description": "Authentication failed",
"responseCode": 500,
"code": "EAUTH",
"command": "AUTH PLAIN",
"networkRouting": {
"localAddress": "198.51.100.24",
"name": "relay.example.com"
}
},
"gmailWatch": {
"state": "active",
"lastCheck": "2021-07-08T07:06:34.336Z",
"expires": "2021-07-15T07:06:34.336Z"
},
"syncError": {
"path": "INBOX",
"time": "2021-07-08T07:06:34.336Z",
"error": "Failed to open mailbox"
},
"connections": 2,
"webhooksCustomHeaders": [
{
"key": "Authorization",
"value": "Bearer <token>"
}
],
"locale": "fr",
"tz": "Europe/Tallinn",
"type": "outlook",
"app": "AAABhaBPHscAAAAH",
"baseScopes": "imap",
"counters": {
"events": {
"messageNew": 30,
"messageDeleted": 5
}
},
"quota": {
"usage": 8547884032,
"limit": 16106127360,
"status": "53%"
},
"syncTime": "2021-02-17T13:43:18.860Z",
"outlookSubscription": {
"id": "0fc0f6bb-a3e1-4f7a-9d3a-8e2f1f8b9c11",
"expirationDateTime": "2021-07-11T07:06:34.336Z",
"state": {
"time": 1625727994336,
"error": "Subscription renewal was rejected"
}
},
"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"
}
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.