New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk

  • v1.2.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Fingerprint logo

CI badge CI badge CI badge Discord server

Fingerprint Pro Server Go SDK

Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro.

This Go package is automatically generated by the Swagger Codegen project:

  • API version: 3
  • Package version: 1.2.0
  • Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen

Requirements.

Go Lang 1.17 or higher

Installation & Usage

  1. Get the package from GitHub:
go get github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk
  1. Import and use the library:
package main

import (
	"context"
	"fmt"
	"github.com/antihax/optional"
	"github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/sdk"
	"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 {
		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 visits/GetVisits_APIKey.go

Region

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"
)

func main() {
    cfg := sdk.NewConfiguration()

    cfg.ChangeRegion(sdk.RegionEU) // or sdk.RegionAsia
}

Documentation for API Endpoints

All URIs are relative to https://api.fpjs.io

ClassMethodHTTP requestDescription
FingerprintApiGetEventGet /events/{request_id}Get event by request ID
FingerprintApiGetVisitsGet /visitors/{visitor_id}

Documentation For Models

Documentation For Authorization

ApiKeyHeader

  • Type: API key
  • API key parameter name: Auth-API-Key
  • Location: HTTP header

ApiKeyQuery

  • Type: API key
  • API key parameter name: api_key
  • Location: URL query string

Author

support@fingerprint.com

FAQs

Package last updated on 24 Oct 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc