Authentication for gRPC Streaming
gRPC streaming connections use JWT (JSON Web Token) authentication obtained from the REST API. This guide explains the complete authentication flow using Python.Authentication Architecture
Step 1: Obtain JWT Token from REST API
Before establishing any gRPC streaming connection, you must first authenticate via the REST API.Login Request
Login Response
Token Fields:
access_token: Use this for gRPC authenticationrefresh_token: Use this to obtain a new access token before expirationaccess_expiration_time: When the access token expiresrefresh_expiration_time: When the refresh token expires
Step 2: Attach Token to gRPC Metadata
Once you have the access token, include it in the gRPC metadata for every streaming connection.Handling Authentication Errors
Common Authentication Errors
| Error Code | Description | Solution |
|---|---|---|
UNAUTHENTICATED | Token is invalid or missing | Verify token in metadata, re-login if expired |
PERMISSION_DENIED | Token is valid but lacks permissions | Check user permissions with support |
UNAVAILABLE | Cannot reach authentication service | Check network connectivity, retry with backoff |

