
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v3
Advanced tools
Fingerprint is a device intelligence platform offering 99.5% accurate visitor identification. Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.
This Go package is automatically generated by the Swagger Codegen project:
Go Lang 1.17 or higher
We keep the Go support policy and support the last two major versions of Go.
go get github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v3
package main
import (
"context"
"fmt"
"github.com/antihax/optional"
"github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/sdk/v3"
"log"
)
func main() {
cfg := sdk.NewConfiguration()
client := sdk.NewAPIClient(cfg)
// You can also use sdk.RegionUS or sdk.RegionAsia. Default one is sdk.RegionUS
//cfg.ChangeRegion(sdk.RegionEU)
// Configure authorization, in our case with API Key
auth := context.WithValue(context.Background(), sdk.ContextAPIKey, sdk.APIKey{
Key: "SECRET_API_KEY",
})
// Usually this data will come from your frontend app
visitorId := "VISITOR_ID"
opts := sdk.FingerprintApiGetVisitsOpts{
RequestId: optional.NewString("REQUEST_ID"),
}
response, httpRes, err := client.FingerprintApi.GetVisits(auth, visitorId, &opts)
fmt.Printf("%+v\n", httpRes)
if err != nil {
switch err.(type) {
case *sdk.GenericSwaggerError:
switch model := err.(sdk.GenericSwaggerError).Model().(type) {
case sdk.ManyRequestsResponse:
log.Printf("Too many requests, retry after %d seconds", model.RetryAfter)
}
default:
log.Fatal(err)
}
}
fmt.Printf("Got response with visitorId: %s", response.VisitorId)
}
Note You can also check examples located in example directory. To run the examples:
cd example && FINGERPRINT_API_KEY=SECRET_API_KEY VISITOR_ID=VISITOR_ID_EXAMPLE go run getVisits.goAlternatively, you can define your environment variables inside
example/.envfile and run the examples without passing them as arguments. If your subscription region is not the “Global/US” region, useREGION=euorREGION=apin the line above or in your local.envfile.
If your subscription is in region other than US, you need to change the region in the configuration:
import (
"github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/sdk/v3"
)
func main() {
cfg := sdk.NewConfiguration()
cfg.ChangeRegion(sdk.RegionEU) // or sdk.RegionAsia
}
All URIs are relative to https://api.fpjs.io
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FingerprintApi | GetEvent | Get /events/{request_id} | Get event by requestId |
| FingerprintApi | GetVisits | Get /visitors/{visitor_id} | Get visits by visitorId |
To report problems, ask questions or provide feedback, please use Issues. If you need private support, you can email us at oss-support@fingerprint.com.
This project is licensed under the MIT license.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.