Wrangler login issue to use R2

Um using an Ubuntu 22.04 LTS server so I don’t have a browser.
The command
wrangler login --browser false
returns a long string:
“Visit this link to authenticate:…”
to follow and waits for a response instead of returning a prompt.
I also tried:
wrangler login -e .env
wrangler login -e ./.env
The .env file has:
CLOUDFLARE_API_TOKEN-
CLOUDFLARE_ACCOUNT_ID=

wrangler whoami
This does give my email account name and Account ID.

I run
wrangler logout
Response:
:partly_sunny: wrangler 3.5.1

Not logged in, exiting…

BUT it still returns Acct name aind Account ID when prompted:
wrangler whoami

I can’t get cURL to interact with R2. I keep getting:

<?xml version="1.0" encoding="UTF-8"?>InvalidArgumentInvalid Argument: Authorization

There has to be an easier / more definitive way of Auth and status.