# rpc error: code = Unauthenticated desc = missing or invalid authentication token

- **ID:** `go/grpc-unauthenticated-metadata`
- **Domain:** go
- **Category:** auth_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The gRPC request does not include the required authentication metadata (e.g., an authorization token) or the token is invalid.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   md := metadata.Pairs("authorization", "Bearer "+token); ctx := metadata.NewOutgoingContext(context.Background(), md); resp, err := client.Call(ctx, ...)
   ```
2. **** (85% success)
   ```
   Implement a token provider that obtains and caches valid tokens.
   ```

## Dead Ends

- **** — This weakens security and is not advisable in production. (80% fail)
- **** — The server will still reject it. (90% fail)
