- Directly using standard tools like
grpcurlor by writing your own gRPC clients. - Using Sift’s pre-built client libraries, available for select programming languages to simplify setup.
Listing services from the command line
You can usegrpcurl to explore Sift’s available gRPC services directly from the command line.
- List all available services
- List all endpoints of a particular service
gRPC base URL and port: Do not include
https:// in the base URL, use only the hostname. $PORT_NUM is always 443.Official client libraries
Sift provides pre-built client libraries for Python, Rust, and Go, maintained as open source in the Sift GitHub repository. These libraries use the gRPC API internally. Supported languages:Other languages
If your preferred language doesn’t yet have a dedicated client library, you can instead:- Generate a client with Buf to compile Sift’s Protocol Buffers into gRPC client code for your preferred language.
- Use the Sift REST API, a standard HTTP-based interface for integration.
URL formatting for official gRPC clients
The required format for official gRPC API URLs depends on your client library. Some libraries require you to omit the URL scheme and port number, while others expect them to be included. Refer to the documentation of your chosen client library to confirm the expected URL format.Port: The gRPC API uses port
443 by default in all environments.Connect with an official client
Python
-
Create a Python environment.
-
In your Python environment (
venv) install the Sift Python package: -
In your Python environment directory, create a file named
main.pyand paste the following code: -
In your Python environment directory, run the following command after replacing the placeholders (
$SIFT_API_KEYand$SIFT_GRPC_BASE_URL) with your actual values:
Rust
-
Create a Rust project.
-
In your Rust project, add the
sift_rscrate. -
In your Rust project, add the
tokioruntime. -
Copy and paste the following into your
my_sift_project/src/main.rs: -
In your Rust project directory, run the following command after replacing the placeholders (
$SIFT_API_KEYand$SIFT_GRPC_BASE_URL) with your actual values:
Go
-
Set up a dedicated directory and initialize it as a Go module using
go mod: -
Use
go getto fetch the Sift Go SDK and include it in your project: -
In the
sift_go_projectdirectory, create amain.gofile and copy and paste the following into that file: -
Verify and tidy up your module dependencies:
-
In your Go module, run the following command after replacing the placeholders (
$SIFT_API_KEY,$SIFT_GRPC_BASE_URL, and$PORT_NUM) with your actual values: