On this page

Task guides

Send authenticated requests

Replay an HTTP request using the cookies from a browser you have already signed in to.

Choose the signed-in browser

Open or sign in to the site in the target browser. Use browser_list to get its browserId, then replace the sample URL with a known endpoint. Mearl sends a GET request with matching browser cookies by default. The result includes the HTTP status, body, and attached cookie count.

Shell
mearl send_request --browser '<browserId>' --payload '{"url":"https://api.example.com/me"}'

Handle permissions and expired sessions

If the host asks for domain access, grant access in Chrome before retrying. In extension mode, Mearl attaches the matching cookies inside the extension. Check for a login page, expired session, or unexpected browser if the response differs from what you saw in the original tab.

Use send_request when you know the HTTP endpoint. Inspect requests in DevTools or get_requests when you first need to learn what the page sends. For protocol-specific or managed authentication, use the installed capability’s command and its authorization flow.

Verify a report request before reusing it

For a recurring report, start with a read-only request you have observed in a successful page session.

  1. Apply a known date filter in the page and identify the request that loads the report.
  2. Reproduce the request with the same filter and the same browser profile. Check the response body and compare the rows with the page.
  3. Keep the date range as an input when packaging the call into a Skill. Check the response format as well as the status, since an expired session can return a login page.