gRPC status 16: UNAUTHENTICATED

UNAUTHENTICATED is gRPC status code 16. The request has no valid credentials for the operation.

Updated

Usual causes

  • No authorization metadata was sent.
  • The token has expired, or was issued for another environment.
  • The metadata key or format is wrong, such as a missing Bearer prefix.
  • Mutual TLS is required and no client certificate was presented.

What to check

  1. The metadata actually sent: key authorization, value Bearer <token>. gRPC metadata keys are lowercase.
  2. The token's expiry and audience.
  3. For mTLS, that the client certificate and key are configured and signed by a CA the server trusts.

Not to be confused with

Valid credentials without the right to do something get PERMISSION_DENIED.

What it looks like

A typical error, as a Go client prints it: rpc error: code = Unauthenticated desc = invalid token: token is expired

Retry, and the HTTP equivalent

UNAUTHENTICATED
Code16
NameUNAUTHENTICATED
In istek's status barunauthenticated
RetryAfter refreshing the credentials, yes; with the same ones, no.
HTTP status401

istek names the status of every call it makes, unauthenticated included, and explains transport failures in plain words. See istek vs Postman for gRPC for how that compares. See istek.

istek, $14.99 once

macOS 14.0+ · Apple Silicon · no account, no telemetry

Buy istek · $14.99