Browse the docs

Read a hosted connect session

get/v1/hosted/connect-sessions/{token}
SDK workwae.hostedConnectSessions.get()No API key: the token in the path is the credential

Errors

StatusReasonWhen
404connect_session_not_found
No session has this id (or token).

It can also answer the errors every operation can answer. Each error's reason is the body's code.

Parameters

NameInSchema
tokenrequiredpath
string
min length 1

Responses

  • 200OK
    application/json
    ConnectSessionPublic
    • tenantNamestring
    • providersarray of enum
      Item properties
      One of"google""microsoft""imap"
    • microsoftCloudenum
      One of"global""gcc-high""dod""china"
    • statusenum
      One of"pending""completed""failed"
    • reauthEmailstring or null
    • loginHintstring or null
    • expiresAtstring (date-time)
    Headers
    • X-Request-IdstringThe request's id: the X-Request-Id you sent when it is 1 to 128 of A-Z a-z 0-9 . _ : -, else one the API generated.
curl -X GET "https://api.workwae.com/v1/hosted/connect-sessions/string"

Connect an IMAP account from the hosted page

post/v1/hosted/connect-sessions/{token}/imap-accounts
SDK workwae.hostedConnectSessions.createImapAccount()No API key: the token in the path is the credential

When the tenant's plan allows no more accounts, or its payment is past due beyond the grace period, the session fails and redirectUrl carries status=error&error=plan_limit_accounts (or billing_past_due), as the OAuth callback does. Giving dav switches settings.calendarEnabled and contactsEnabled on for the halves found unless the session's options name them, as POST /v1/imap-accounts does. A reconnect session replaces the password only: the account keeps its stored servers and DAV settings, and any sent here are ignored. Its DAV login is checked again: with the new password when DAV uses the IMAP password, otherwise with dav.password when given (which then replaces the stored DAV password) or the stored one.

Errors

StatusReasonWhen
400session_expired
The session is past expiresAt.
400redirect_uri_not_allowed
The session's return address is no longer on the tenant allowlist.
400provider_not_allowed
The session does not offer the IMAP form.
400login_failed
A server (IMAP, SMTP, CalDAV or CardDAV) refuses the login.
400server_not_allowed
A server resolves to a private or loopback address.
400plaintext_not_allowed
A server is named with security none (a plaintext login).
400dav_discovery_failed
Neither a CalDAV nor a CardDAV server was found or answered.
400not_dav_server
A named CalDAV or CardDAV URL is no DAV server (it answers 404, 403, or not as one).
400password_required
A reconnect session's DAV has a password of its own, none is stored and dav.password is left out.
404connect_session_not_found
No session has this id (or token).
404account_not_found
The account a reconnect session was created for was deleted.
409session_used
The session already completed or failed.
409account_exists
The tenant already has a live IMAP account with this address and the session was not created to reconnect it (accountId).
409account_mismatch
A reconnect session's account has another address, or is not an IMAP account.
422autodiscovery_failed
imap was left out and autodiscovery found no IMAP server for the address.
429provider_throttled
The provider asked us to slow down (with Retry-After when it named a wait).
502provider_unavailable
The provider could not be reached (with Retry-After when it named a wait).

It can also answer the errors every operation can answer. Each error's reason is the body's code.

Parameters

NameInSchema
tokenrequiredpath
string
min length 1

Request body

required
application/json
object
  • emailstring (email)required
    max length 320
  • displayNamestring
    max length 255
  • passwordstringrequired
    length 1 to 1024
  • smtpPasswordstring
    length 1 to 1024
  • imapMailServerInput
    Properties
    • hoststringrequired
      length 1 to 253
    • portintegerrequired
      1 to 65535
    • securityenumrequired
      One of"tls""starttls""none"
    • userstring
      length 1 to 320
  • smtpMailServerInput or null
    Properties
    • hoststringrequired
      length 1 to 253
    • portintegerrequired
      1 to 65535
    • securityenumrequired
      One of"tls""starttls""none"
    • userstring
      length 1 to 320
  • appendSentboolean
  • davDavInput
    Properties
    • calendarUrlstring (uri) or null
      max length 2048
    • contactsUrlstring (uri) or null
      max length 2048
    • userstring
      length 1 to 320
    • passwordstring or null
      length 1 to 1024

Responses

  • 200OK
    application/json
    HostedImapResult
    • redirectUrlstring (uri)
    Headers
    • X-Request-IdstringThe request's id: the X-Request-Id you sent when it is 1 to 128 of A-Z a-z 0-9 . _ : -, else one the API generated.
curl -X POST "https://api.workwae.com/v1/hosted/connect-sessions/string/imap-accounts" \
  -H "content-type: application/json" \
  -d '{
  "email": "[email protected]",
  "password": "string"
}'

Find IMAP and SMTP settings from the hosted page

get/v1/hosted/connect-sessions/{token}/autoconfig
SDK workwae.hostedConnectSessions.autoconfig()No API key: the token in the path is the credential

Errors

StatusReasonWhen
400session_expired
The session is past expiresAt.
400redirect_uri_not_allowed
The session's return address is no longer on the tenant allowlist.
400provider_not_allowed
The session does not offer the IMAP form.
404connect_session_not_found
No session has this id (or token).
409session_used
The session already completed or failed.
422autodiscovery_failed
No IMAP settings were found for the address.

It can also answer the errors every operation can answer. Each error's reason is the body's code.

Parameters

NameInSchema
tokenrequiredpath
string
min length 1
emailrequiredquery
string (email)
max length 320

Responses

  • 200OK
    application/json
    DiscoveredSettings
    • sourceenum
      One of"provider""autoconfig""ispdb""srv""mx"
    • imapMailServer
      Properties
      • hoststring
      • portinteger
      • securityenum
        One of"tls""starttls""none"
      • userstring
    • smtpMailServer or null
      Properties
      • hoststring
      • portinteger
      • securityenum
        One of"tls""starttls""none"
      • userstring
    • oauthenum or null
      One of"google""microsoft"
    • davDiscoveredDav or null
      Properties
      • sourceenum
        One of"provider""well-known""srv"
      • calendarUrlstring or null
      • contactsUrlstring or null
    Headers
    • X-Request-IdstringThe request's id: the X-Request-Id you sent when it is 1 to 128 of A-Z a-z 0-9 . _ : -, else one the API generated.
curl -X GET "https://api.workwae.com/v1/hosted/connect-sessions/string/autoconfig?email=ada%40example.com"

Read a hosted meeting connect session

get/v1/hosted/meeting-connect-sessions/{token}
SDK workwae.hostedMeetingConnectSessions.get()No API key: the token in the path is the credential

Errors

StatusReasonWhen
404meeting_connect_session_not_found
No session has this token, or its account no longer exists.

It can also answer the errors every operation can answer. Each error's reason is the body's code.

Parameters

NameInSchema
tokenrequiredpath
string
min length 1

Responses

  • 200OK
    application/json
    MeetingConnectSessionPublic
    • tenantNamestring
    • serviceenum
      One of"zoom""webex"
    • accountEmailstring
    • statusenum
      One of"pending""completed""failed"
    • expiresAtstring (date-time)
    Headers
    • X-Request-IdstringThe request's id: the X-Request-Id you sent when it is 1 to 128 of A-Z a-z 0-9 . _ : -, else one the API generated.
curl -X GET "https://api.workwae.com/v1/hosted/meeting-connect-sessions/string"