Unexpected response code: 402 Payment Required
FATA[12:00:00] Failed to get connection settings: Unexpected response code: 402 Payment Required
Code: PaymentRequired
Request ID: 3f9d61b0a28c4e57d1e06b9a4c7f2385
tuna CLI and Tuna Desktop show this error when you start a tunnel. The client doesn't reconnect and exits right away.
In this case the server sends no error message, so the client prints only the HTTP status. Other CLI commands show the same line when a feature requires a subscription.
Cause
The client acts on behalf of a team, and the team has no active subscription: nobody bought one, or it has expired. The free plan applies only to personal accounts; in a team, tunnels run only with a subscription.
The team depends on how you signed in:
- an API key belongs to the team it was created in;
- a
tuna loginsession belongs to the team that was selected in the dashboard when you confirmed the sign-in.
What to do
- Run
tuna whoami: it shows which team the client acts on behalf of and whether the team has a subscription.Freemeans there is no subscription. - Check the team's subscription in the dashboard: pick the team with the selector in the top left corner.
- If the subscription has expired, ask the team owner to renew it. See the plans on the website.
- To start a tunnel on the free plan, sign in again with
tuna loginand pick your personal account in the dashboard, or use an API key created in your personal account.