Cannot install "certbot": Post "https://api.snapcraft.io/v2/snaps/refresh": Method Not Allowed

I am trying to install certbot through snap on a vps with Ubuntu 22.04.4 LTS and getting the following error:

$ sudo snap install --classic certbot
error: cannot install "certbot": Post "https://api.snapcraft.io/v2/snaps/refresh": Method Not Allowed

I have checked snapd status through systemctl status snapd.service and it is running (active). Also tried to install core but getting similar error:

$ sudo snap install core
error: cannot install "core": Post "https://api.snapcraft.io/v2/snaps/refresh": Moved Permanently

Any guidance to fix the issue would be much appreciated.

This post was flagged by the community and is temporarily hidden.

What’s the output of snap version on your server?

Also, can you try again? Does it still happen, or was it a blip?

Output of snap version:

snap    2.61.3+22.04
snapd   2.61.3+22.04
series  16
ubuntu  22.04
kernel  5.15.0-101-generic

Yes, it is still happening. It looks like all snap commands are throwing similar errors. I also tried with snap refresh. Same error.

Any proxies involved?

No, I am not using any proxy.