curl and jq installed. Set TELNYX_API_KEY to your API key locally before starting; do not put it in shared logs. All resource IDs and element refs below come from your actual responses.
Set Up Requests and Polling
wait_seconds limits the submission wait, not execution time. A 202 means the action is still queued or running; the helper polls until succeeded, failed, or unknown. It stops on failures and HTTP errors, including 503. See recovery guidance before repeating a request with an uncertain outcome.
Create a Session
Allow the example page and the IANA domains its link may navigate to, including subdomains:ready session accepts new actions. If it is closing, closed, failed, or expired, stop instead of retrying actions on it.
Navigate
Observe and Select a Current Ref
The page currently has a link to IANA. Select the link from the returned refs rather than assuming an ID such ase13.
Full observation refs are available only in the original successful POST response. GET polling returns metadata with empty refs. If the observe action needed polling, the bounded loop below requests a fresh observation after that action finishes. It never retries a click or other mutation.
Click the Observed Link
Screenshot and Download
download_url is a signed relative path. Prepend the API host and include Bearer authentication on the download request too. The screenshot remains downloadable until its artifact expiry; an expired download signature requires a fresh metadata request.
Close the Session
closed and releases its resources. An already terminal session is returned unchanged. If an earlier step stopped, inspect the printed session ID and close the session when appropriate; otherwise it expires according to its lifetime or idle timeout.