Skip to Content

Reauth a platform

OAuth tokens expire, and people revoke access. When a platform rejects the stored credential, AgentValet marks that connection’s health as reauth_needed and your agent gets a specific error instead of a bare upstream 401.

How you’ll notice

Three places:

  1. /platforms — the connection shows a red Re-auth needed badge.
  2. Audit log — the failed calls, with the reason in their metadata.
  3. The agent itself — its use_platform call gets back a clear error:
    • 502 with code: "reauth_failed" when the platform rejected the credential and an automatic refresh didn’t fix it. It includes a report_hint, so the agent can tell whoever it’s talking to that {platform} needs reconnecting, and lodge a self-report.
    • 409 with error: "platform_reauth_needed" for a connected MCP server whose sign-in has expired and couldn’t be refreshed.

How to reauth

/platforms → find the affected connection → click Reconnect.

For OAuth platforms, the same sign-in flow as the initial Connect opens, re-authorizing the existing connection in place. Sign in, approve, and the new token is stored in our credential vault. Your grants keep pointing at the same connection.

For API-key platforms, the connect form opens with the existing field labels. Paste a new key.

Click Test on the connection afterwards to confirm it’s healthy.

Lazy refresh — usually you won’t have to do this manually

For most OAuth platforms, AgentValet attempts a token refresh automatically when the platform returns a 401. If that succeeds, the call is retried and goes through, and you never see reauth_needed.

You only need to reconnect manually when:

  • The refresh token itself has expired (usually 90+ days idle)
  • The user revoked AgentValet’s access on the platform’s side
  • The platform changed its OAuth scopes and you need to re-consent

A failed refresh also counts toward the agent’s circuit breaker: three of them in 10 minutes open it, so an agent stops retrying a credential that can’t work.

What’s affected

While a connection needs reauth, every agent using that connection fails its calls there. Other platforms and other connections are unaffected — the issue is per connection.

Next

Last updated on