fetch_with_auth tool is a deprecated compatibility alias for fetch. It uses the same unified flow: probe the route, attempt SIWX (Sign-In With X) when available, and only pay if the route still returns 402.
Equivalent CLI command: npx agentcash fetch-auth <url> (deprecated alias for npx agentcash fetch <url>)
Parameters
The URL to fetch.
HTTP method. One of
GET, POST, PUT, PATCH, DELETE.Raw request body string.
Additional HTTP headers. Each entry must be a string in
Name: value format.Request timeout in milliseconds.
Response
The parsed response body from the endpoint.
Payment details, present when the request still required payment after the SIWX retry.
Behavior
- Sends the initial request
- If the response includes a SIWX challenge, extracts the challenge
- Signs the challenge with your wallet’s private key
- Retries the request with signed auth headers
- If the route still returns
402, pays and retries again - Returns the final response
When to use
Preferfetch for new integrations. Keep fetch_with_auth only for compatibility with older prompts or clients.