discovery

Supported methods

GET

GET: Attempts to discover IMAP settings for a given email address

This is useful when you want to add an email account under your API key (see sources) and you'd like to make the settings easier to fill by the user with pre-populated data.

This will also figure out if OAuth2 over IMAP is available.

GET https://api.context.io/2.0/discoverytest it

Parameters

nametypedescription
required:
source_typestringThe type of source you want to discover settings for. Right now, the only supported source type is IMAP
emailstringAn email address you want to discover IMAP settings for. Make sure source_type is set to IMAP.

Response body

If likely IMAP account settings have been found for the given address, the response will include these settings that can be used to auto-populate a form.

{
  "email": stringThe email address requested for discovery,
  "found": booleantrue if settings were found, false otherwise,
  "type": stringType of provider, (eg. "gmail"),
  "imap": {
    "server": stringFQDN of the IMAP server,
    "username": stringWhat the username should be for authentication,
    "port": numberNetwork port IMAP server is listening on,
    "use_ssl": booleanWhether that server:port uses SSL encrypted connections,
    "oauth": booleantrue if the IMAP server support authentication through OAuth2 (setting related OAuth2 consumers)
  },
  "documentation": arrayList of documentation pages that may be useful for end-users for this specific IMAP provider
}

Note that if the found property is false, the type, imap, and documentation properties won't appear in the response.