For the complete documentation index, see llms.txt. This page is also available as Markdown.

IMAP

IMAP lets Refract read one-time codes from your email and submit them automatically, speeding up logins and checkouts on sites like Best Buy.

Some sites email you a one-time code during login or checkout. With an IMAP login added, Refract reads the code from your inbox and submits it automatically instead of making you race to type it in. Best Buy email codes and Target OTP login both rely on this.

IMAP logins live in the bot under Settings > IMAP Logins.

The IMAP Logins tab in bot Settings
The IMAP Logins tab, with the toolbar in the top right.

Add an IMAP login

1

Create a login

On the IMAP Logins tab, click the + (Create Login) button.

The IMAP toolbar buttons
Left to right: AYCD, Create Login, Export Logins, Login Selected, Delete.
2

Choose your server

Pick your email provider from the Server dropdown: Gmail, iCloud, Yahoo, or Custom for any other IMAP provider.

The Add IMAP Login window
Pick the server, then add one login or switch to Mass login input.
3

Enter your credentials

For a single account, use Input one login and enter the username and password. To add many at once, switch to Mass login input and paste credentials one per line in username:password format.

The password is usually not your normal email password. Gmail, iCloud, and Yahoo all require an app password for IMAP; see the section below for how to generate one.

4

Create the login

Click Create Login. Your account appears in the list, ready to pull codes.

Get an app password

Follow the section for your provider, then use the generated app password as the password in Refract.

Gmail

  1. IMAP is enabled by default on all Gmail accounts.

  2. Go to myaccount.google.com/apppasswords, add a custom app name like Refract, and click create. Use the generated password in Refract.

iCloud

  1. Sign in at account.apple.com.

  2. Open Sign-In and Security > App-Specific Passwords.

  3. Generate a new password with a name like Refract and use it in Refract.

Yahoo

  1. Scroll down to Other ways to sign in.

  2. Click Generate app password and generate a new one.

  3. Use the generated app password to add your Yahoo account in Refract.

AOL

  1. Scroll down to Other ways to sign in.

  2. Click Generate app password and generate a new one.

  3. Add the account in Refract using the Custom server option with your AOL address and the app password.

AYCD Inbox

Refract integrates with AYCD Inbox, an email client built for managing large numbers of accounts. If you run your emails through Inbox, Refract can pull codes from it directly. This is also the only way to use Outlook emails with Refract.

AYCD Inbox does not replace your IMAP logins. You can have both in use at the same time. A common setup is Outlook accounts through Inbox and every other email as a regular IMAP login.

1

Open the AYCD configuration

On the IMAP Logins tab, click the AYCD button.

The Configure AYCD Inbox window
Paste your Inbox API key. Template ID usually stays Default.
2

Paste your API key

Enter your Inbox API key. It starts with Inbox-.

3

Set the Template ID

Usually leave this as Default. It only matters if you use forwarding or catchall setups in Inbox.

4

Save

Click Save. Refract now pulls codes through AYCD Inbox.

Setting up Inbox itself (adding your accounts, OAuth2 logins, forwarding) is covered by AYCD's own guides: support.aycd.io/account/guides/category/inbox.

Manage your logins

  • Right-click a login to Edit, Login, or Delete it.

  • Login Selected (the lock button) logs the selected accounts into their mail servers.

  • Export Logins exports your saved logins.

  • The red X deletes the selected logins.

Connection status and errors

The Status column tells you whether each login is working. A working login shows Connected in green. That is what you want to see before a drop.

IMAP logins showing green Connected status
Green Connected means the login is working.

If a login has a problem, the status shows a red error in the form Error: <error code>. The most common one:

  • Error: Invalid credentials (Failure): the email or password is wrong. Remember the password usually needs to be an app password, not your normal email password. Edit the login (right-click > Edit) and fix the credentials.

An IMAP login showing Error: Invalid credentials (Failure)
Invalid credentials: the email or password is wrong. Usually it needs an app password.

If a previously working login starts erroring, check whether that same email is connected somewhere else. Providers limit simultaneous IMAP connections, so the same login running in several bots at once will get rejected. Close the other connections, wait, then log in again.

FAQ

Is there an AYCD discount for Refract users?

Yes. Claim the partnership offer here: aycd.io/account/partnership/offers

Does AYCD need to be open for Inbox to work?

Yes. AYCD has to be running with Inbox active on the same machine as Refract for the whole time you need codes. The Inbox API pulls codes through the running AYCD application, so closing it stops codes arriving even though your API key is still saved in Refract.

Can I use both IMAP logins and AYCD Inbox at the same time?

Yes. Both can be in use at the same time; connecting AYCD Inbox does not disable your IMAP logins. A common setup is Outlook accounts through Inbox and every other email as a regular IMAP login.

Why is my IMAP not submitting the codes?
  • The code may never have been sent in the first place. Sites like Best Buy are notorious for making tasks wait for a code that never comes.

  • If the code was sent, make sure it lands in the Inbox folder of your email. If your mail rules sort it into another folder, Refract may not be able to find it.

  • Check your device time (below). If it is out of sync, IMAP will not work.

  • If you pull codes through AYCD Inbox, check that AYCD is actually open and running. Codes stop arriving the moment it is closed.

Fix your device time (IMAP will not work if it is wrong)

Your device time must be in sync with your local time.

On Windows:

  1. Press Win + I to open Settings.

  2. Go to Time & Language > Date & time.

  3. Toggle Set time automatically and Set time zone automatically ON.

  4. Click Sync now under Additional settings. If there is no Sync now button, turn both toggles off and back on to force a sync.

  5. If the time zone is wrong, turn off Set time zone automatically and pick the correct zone from the dropdown.

On Mac:

  1. Open the Apple menu and choose System Settings.

  2. Go to General > Date & Time.

  3. Toggle Set time and date automatically ON.

  4. Click Time Zone and make sure Set time zone automatically is enabled.

  5. If changes do not apply, restart your Mac.

Last updated

Was this helpful?