Authenticate with the gRPC API

Overview

Every request to the gRPC API must be authenticated to ensure secure access to your data and services. Authentication requires two components, both of which must come from the same provisioned environment:

  • A base URL that identifies the gRPC API server you are connecting to.
  • An API key that serves as your secure credential.

Instructions

To authenticate with the gRPC API, consider the following steps:

  1. Create an API key.

    You can generate an API key through the Sift web application or programmatically via the Sift API. To learn how to obtain the base URL for REST/gRPC requests, Obtain the base URL for REST/gRPC requests.

  2. Obtain the base URL for gRPC requests.

    You can find the appropriate base URL for your project in the Sift UI when generating an API key.To learn how to create an API key in the Sift user interface, see Create an API key.

  3. Replace the placeholders ($SIFT_API_KEY, $SIFT_GRPC_BASE_URL, and $PORT_NUM) in the following command with your actual values:
    grpcurl -H "authorization: Bearer $SIFT_API_KEY" $SIFT_GRPC_BASE_URL:$PORT_NUM sift.ping.v1.PingService/Ping
    • When running a grpcurl command, do not include https:// in the base URL. The base URL should consist only of the hostname without any protocol prefix.
    • The $PORT_NUM placeholder should be replaced with 443, which is the required port for the gRPC base URL in all environments.

On this page