Endpoint

Overview

Taps the button that does something you cannot take back: post, like, follow, comment, delete, send. It taps at most once for your organization, the kind and the idempotencyKey, whatever happens: a retry, a lost answer, a second program.
  1. The target is found on the screen, as Tap finds it. When it is not there, nothing is written and the result is target_not_found.
  2. A receipt is written: the commit is about to tap.
  3. The tap. The receipt then says tapped.
The same kind and idempotencyKey again answers the stored receipt with repeated: true and does not tap. When the earlier answer was lost during the tap, so it is not known whether it tapped, the key is refused with commit_uncertain and is never tapped again: look at the screen, and use a new key only if the action did not happen. Workflows’ Commit node keeps the same receipts: its grant is the kind (post, like, follow, comment, delete, send or other), so a workflow and a program that use the same kind and key make one commit between them. A button that toggles, such as a like heart that unlikes a liked video, is not guarded by the key: a new key taps again. Check the button’s state first, for example with a screen whose color condition finds the liked colour on the button, and commit only when it is not on. Requires an active session on the phone. One phone per request. Platforms: Android, iPhone.

Request Body

string[]
A list of exactly one phone. Prefer phoneId.
string
The phone. The answer’s data is then that phone’s result itself, and a failure on the phone is the request’s ok: false with the phone’s error (at the HTTP status of its code). Give phoneId or phoneIds, not both.
string
required
What the tap does: post, like, follow, comment, delete, send or other.
object
required
What to tap, as on Tap: exactly one of text, label, element or x and y.
string
required
Up to 200 characters that name this one action, such as the id of the video you are posting. The same key with the same kind is the same commit.
object
Look at the screen after the action, in the same answer. The hub takes a frame before the action, does it, waits until the screen settles (two frames about 300 ms apart that look the same, for at most settleMs), and adds screen, effect and, when the action should have changed the screen and did not, warnings to the phone’s result. Costs one look at the screen plus the wait.

Response

boolean
true when the request was carried out. Check each result for how it went on that phone.
Result
The phone’s Result.

Phone Errors