Go Quickstart
Getting started with the Go Sift client library
Credentials
Before starting this section be sure to retrieve your API key and the appropriate Sift URL for your provisioned environment. Instructions on how to retrieve the API key and URL and can be found in the authentication section of the documentation.
To connect to Sift's gRPC API using Go we will use github.com/sift-stack/sift/go.
-
Begin by creating a new Go module with
go mod init
and install the Sift Go package: -
With our dependency installed, copy-paste the following into your
main.rs
: -
Execute the program from your commandline with the
SIFT_URI
andSIFT_API_KEY
environment variables from the authentication page:Note about the URL
Do note that the Go gRPC package expects the URL to exclude the scheme (i.e.
https://
) but include the port number which is433
.If everything was setup correctly you should see the following printed to your standard output: