This does the same thing as the connect_tokens resource but can be used to add a second email data source to an existing account instead of creating a new account and assigning a new email source to it.
[
{
"token": stringId of the connect_token,
"email": stringemail address specified on token creation,
"created": numberUnix timestamp of the connect_token was created,
"used": numberUnix time this token was been used. 0 means it no account has been created with this token yet,
"expires": mixedUnix time this token will expire and be purged. Once the token is used, this property will be set to false,
"callback_url": stringURL of your app we'll redirect the browser to when the account is created,
"first_name": stringFirst name specified on token creation,
"last_name": stringLast name specified on token creation,
"account": {
If the connect_token hasn't been used yet, this object will be empty
"id": stringId of the account created with this token,
"created": numberUnix timestamp of account creation time,
"suspended": numberUnix timestamp of account suspension time 0 means not suspended,
"email_addresses":arrayArray of email addresses for this account. This only lists the actual addresses as strings.,
"first_name": stringFirst name of account holder,
"last_name": stringLast name of account holder,
"sources": arrayList of sources this account gets data from. See sources
}
},
...
]
| name | type | description |
|---|---|---|
| required: | ||
| callback_url | string (url) | When the user's mailbox is connected to your API key, the browser will call this url (GET). This call will have a parameter called contextio_token indicating the connect_token related to this callback. You can then do a get on this connect_token to obtain details about the account and source created through that token and save that account id in your own user data. |
| optional: | ||
| string | The email address of the account to be added. If specified, the first step of the connect UI where users are prompted for their email address, first name and last name is skipped. | |
| first_name | string | First name of the account holder. |
| last_name | string | Last name of the account holder. |
| source_callback_url | string | If specified, we'll make a POST request to this URL when the initial sync is completed. |
| source_sync_all_folders | integer | By default, we filter out some filders like 'Deleted Items' and 'Drafts'. Set this parameter to 1 to turn off this filtering and show every single folder. |
| source_sync_flags | integer | By default, we don't synchronize IMAP flags. Set this parameter to 1 to turn on IMAP flag syncing for the 'seen' and 'flagged' flags. |
| source_raw_file_list | integer | By default, we filter out files like signature images from the files list. Set this parameter to 1 to turn off this filtering and show every single file attachment. |
{
"success": string true if connect_token was successfully created, false otherwise,
"token": stringId of the token,
"resource_url": stringURL to of the token,
"browser_redirect_url": stringRedirect the user's browser to this URL to have them connect their mailbox through this token
}
Unused connect_tokens are purged after 24 hours, see here for more details.
{
"token": stringId of the connect_token,
"email": stringemail address specified on token creation,
"created": numberUnix timestamp of the connect_token was created,
"used": numberUnix time this token was been used. 0 means it no account has been created with this token yet,
"expires": mixedUnix time this token will expire and be purged. Once the token is used, this property will be set to false,
"callback_url": stringURL of your app we'll redirect the browser to when the account is created,
"first_name": stringFirst name specified on token creation,
"last_name": stringLast name specified on token creation,
"account": {
If the connect_token hasn't been used yet, this object will be empty
"id": stringId of the account created with this token,
"created": numberUnix timestamp of account creation time,
"suspended": numberUnix timestamp of account suspension time 0 means not suspended,
"email_addresses":arrayArray of email addresses for this account. This only lists the actual addresses as strings.,
"first_name": stringFirst name of account holder,
"last_name": stringLast name of account holder,
"sources": arrayList of sources this account gets data from. See sources
}
}