Problem adding a server alias with rsconnect

I'm trying to use rsconnect to add a server alias, but I'm getting a mysterious error:

jim@viz:~$ /opt/python/3.12.4/bin/rsconnect add --api-key rstudio-connect-api-key --server https://viz.datascience.arizona.edu --name viz
Checking https://viz.datascience.arizona.edu...  [ERROR]
Error:     https://viz.datascience.arizona.edu - failed to verify as Posit Connect (Posit Connect reported an error (calling /__api__/server_settings): We couldn't log you in with the provided credentials. Please ask your administrator for assistance.).

I'd ask my administrator for assistance... but I am the administrator. Any insights? Thanks!

The details needed here to clarify exactly what's going on would probably be best provided via a support ticket, but:

You can start by trying curl from wherever you're setting up the rsconnect command-line to verify that the servers are actually able to communicate, e.g. curl https://viz.datascience.arizona.edu/__api__/server_settings, and see what returns.

Thanks, unfortunately I'm trying to make sense of what a support person has already told me to do. They seem to be in a different time zone, so the latency with replies is considerable. The ticket number is 116173.

Thanks for clarifying. I think the followup will be best handled via that ticket, but: I assumed you had redacted the API key in your initial post. You will need to obtain an API key from Connect as described here: Accessing Content via API – Posit Connect Documentation Version 2025.02.0