Wait for a verification code
wait_for_codeWaits up to 30 seconds for a verification or login code to arrive at the address, and returns it with the sending service and when it expires. Returns at once if one arrived in the last 15 minutes. kind: coupon waits for a coupon or promo code instead (after signing up for an offer, say), with its discount and the date it is valid until when the email states them. With since, after_seconds says how long after it the email arrived; offers often come minutes later, so call again if nothing has come yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | otp for a sign-in or verification code, coupon for a coupon or promo code, any for either. | otp |
| test | No | With run_id: the test or step this call belongs to, shown beside what it saw in the report. | |
| since | No | Only match email received at or after this time. Default: the last 15 minutes. | |
| run_id | No | A run from start_run: what this call sees is added to its report. | |
| unused | No | true: only a code or link nobody has used yet (not returned by an earlier wait, nor opened, copied or filled in the app or Proxy Mail QA for Chrome). For a second code without changing since. | |
| address | Yes | A test address in this project. A variant works too (capitals, or a +tag such as name+o'brien@…): it acts on the plain address, and a wait on a +tag variant only finds mail sent to it. | |
| service | No | Only match email from this sender, by service name or domain (for example the name of the app under test). | |
| timeout_seconds | No | How long to wait. 0 checks once. |