{"id":19167163,"url":"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk","last_synced_at":"2025-05-07T13:40:40.897Z","repository":{"id":58374926,"uuid":"523323392","full_name":"fingerprintjs/fingerprint-pro-server-api-go-sdk","owner":"fingerprintjs","description":"Go SDK for Fingerprint Pro Server API","archived":false,"fork":false,"pushed_at":"2025-05-06T08:26:58.000Z","size":20989,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-06T09:40:45.785Z","etag":null,"topics":["audio-fingerprinting","browser","browser-fingerprint","browser-fingerprinting","detection","fingerprint","fingerprinting","fingerprintjs","fingerprintjs-pro","fraud","fraud-detection","golang","identification","visitor-identification"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fingerprintjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-10T11:51:57.000Z","updated_at":"2025-05-06T08:27:01.000Z","dependencies_parsed_at":"2023-02-16T07:46:11.683Z","dependency_job_id":"a524d161-c2e3-4280-9990-079bc606ee3b","html_url":"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk","commit_stats":{"total_commits":219,"total_committers":10,"mean_commits":21.9,"dds":0.4611872146118722,"last_synced_commit":"2c077f2b8332428f2f0f3ebe0fa36b4b5d1bf328"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprint-pro-server-api-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprint-pro-server-api-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprint-pro-server-api-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fingerprintjs%2Ffingerprint-pro-server-api-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fingerprintjs","download_url":"https://codeload.github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252888845,"owners_count":21820077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-fingerprinting","browser","browser-fingerprint","browser-fingerprinting","detection","fingerprint","fingerprinting","fingerprintjs","fingerprintjs-pro","fraud","fraud-detection","golang","identification","visitor-identification"],"created_at":"2024-11-09T09:36:01.445Z","updated_at":"2025-05-07T13:40:40.887Z","avatar_url":"https://github.com/fingerprintjs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://fingerprint.com\"\u003e\n    \u003cpicture\u003e\n     \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://fingerprintjs.github.io/home/resources/logo_light.svg\" /\u003e\n     \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://fingerprintjs.github.io/home/resources/logo_dark.svg\" /\u003e\n     \u003cimg src=\"https://fingerprintjs.github.io/home/resources/logo_dark.svg\" alt=\"Fingerprint logo\" width=\"312px\" /\u003e\n   \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/actions/workflows/release.yml\"\u003e\u003cimg src=\"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/actions/workflows/release.yml/badge.svg\" alt=\"CI badge\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/actions/workflows/tests.yml\"\u003e\u003cimg src=\"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/actions/workflows/tests.yml/badge.svg\" alt=\"CI badge\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/actions/workflows/functional_tests.yml\"\u003e\u003cimg src=\"https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/actions/workflows/functional_tests.yml/badge.svg\" alt=\"CI badge\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/:license-mit-blue.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/39EpE2neBg\"\u003e\u003cimg src=\"https://img.shields.io/discord/852099967190433792?style=logo\u0026label=Discord\u0026logo=Discord\u0026logoColor=white\" alt=\"Discord server\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Fingerprint Pro Server Go SDK\n[Fingerprint](https://fingerprint.com/) is a device intelligence platform offering 99.5% accurate visitor identification.\nFingerprint 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. \n\nThis Go package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:\n\n- API version: 3\n- Package version: 7.4.0\n- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen\n\n## Requirements\n\nGo Lang 1.21 or higher\n\nWe keep the [Go support policy](https://go.dev/doc/devel/release) and support the last two major versions of Go.\n\n## Installation \u0026 Usage\n\n1. Get the package from GitHub:\n```shell\ngo get github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk\n```\n\n2. Import and use the library:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk\"\n\t\"log\"\n)\n\nfunc main() {\n\tcfg := sdk.NewConfiguration()\n\tclient := sdk.NewAPIClient(cfg)\n\n\t// You can also use sdk.RegionUS or sdk.RegionAsia. Default one is sdk.RegionUS\n\t//cfg.ChangeRegion(sdk.RegionEU)\n\n\t// Configure authorization, in our case with API Key\n\tauth := context.WithValue(context.Background(), sdk.ContextAPIKey, sdk.APIKey{\n\t\tKey: \"SECRET_API_KEY\",\n\t})\n\t// Usually this data will come from your frontend app\n\tvisitorId := \"\u003cVISITOR_ID\u003e\"\n\trequestId := \"\u003cREQUEST_ID\u003e\"\n\topts := sdk.FingerprintApiGetVisitsOpts{\n\t\t// Get visits for this requestId\n\t\tRequestId: requestId,\n\t}\n\t// Get visits for given visitorId and requestId\n\tvisits, httpRes, err := client.FingerprintApi.GetVisits(auth, visitorId, \u0026opts)\n\tfmt.Printf(\"%+v\\n\", httpRes)\n\n\tif err != nil {\n\t\tvar tooManyRequestsError *sdk.TooManyRequestsError\n\n\t\t// Handle potential TooManyRequestsError\n\t\tif errors.As(err, \u0026tooManyRequestsError) {\n\t\t\tlog.Fatalf(\"Too many requests, retry after %d seconds\", tooManyRequestsError.RetryAfter())\n\t\t} else {\n\t\t\t// You can also use err.Model() and err.Body() to get more details about the error\n\t\t\tlog.Printf(\"Error %s: %v\", err.Code(), err)\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}\n\n\tfmt.Printf(\"Got response with visitorId: %s\", visits.VisitorId)\n\n\t// Get event by given requestId\n\tevent, httpRes, err := client.FingerprintApi.GetEvent(auth, requestId)\n\tif err != nil {\n\t\t// You can also use err.Model() and err.Body() to get more details about the error\n\t\tlog.Printf(\"Error %s: %v\", err.Code(), err)\n\t\tlog.Fatal(err)\n        }\n\n        // Access identification details\n\tif event.Products.Identification != nil {\n\t\tfmt.Printf(\"Got response with Identification: %v\", event.Products.Identification)\n\t}\n\n    suspect := true\n\topts := sdk.FingerprintApiSearchEventsOpts{\n        // Suspect can be set by using `UpdateEvent` method\n\t\tSuspect: \u0026suspect,\n\t\tPaginationKey: \"1740815825085\"\n\t}\n\t// Search for 10 events with suspect=true\n\tsearchEventsResult, httpRes, err := client.FingerprintApi.SearchEvents(auth, 10, \u0026opts)\n\tif searchEventsResult.Events != nil {\n\t\tfmt.Printf(\"Got response with Events: %v \\n\", searchEventsResult.Events)\n\t}\n}\n```\n\n\u003e **Note**\n\u003e You can also check examples located in [example](./example) directory.\n\u003e To run the examples:\n\u003e ```shell\n\u003e cd example \u0026\u0026 FINGERPRINT_API_KEY=SECRET_API_KEY VISITOR_ID=VISITOR_ID_EXAMPLE go run getVisits.go\n\u003e ```\n\u003e Alternatively, you can define your environment variables inside `example/.env` file and run the examples without passing them as arguments.\n\u003e If your subscription region is not the “Global/US” region, use `REGION=eu` or `REGION=ap` in the line above or in your local `.env` file.\n\n### Region\nIf your subscription is in region other than US, you need to change the region in the configuration:\n```go\n\nimport (\n    \"github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk\"\n)\n\nfunc main() {\n    cfg := sdk.NewConfiguration()\n\n    cfg.ChangeRegion(sdk.RegionEU) // or sdk.RegionAsia\n}\n```\n\n## Sealed results\n\nThis SDK provides utility methods for decoding [sealed results](https://dev.fingerprint.com/docs/sealed-client-results).\nInstall the sealed results dependency as below:\n```shell\ngo get github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk/sealed\n```\nThen you can use below code to unseal results:\n```go\npackage main\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk/sealed\"\n\t\"os\"\n)\n\n// Utility function to decode base64 string\nfunc base64Decode(input string) []byte {\n\toutput, err := base64.StdEncoding.DecodeString(input)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn output\n}\n\nfunc main() {\n\t// Sealed result from the frontend.\n\tsealedResult := base64Decode(os.Getenv(\"BASE64_SEALED_RESULT\"))\n\t// Base64 encoded key generated in the dashboard.\n\tkey := base64Decode(os.Getenv(\"BASE64_SEALED_RESULT_KEY\"))\n\n\tkeys := []sealed.DecryptionKey{\n\t\t// You can provide more than one key to support key rotation. The SDK will try to decrypt the result with each key.\n\t\t{\n\t\t\tKey:       key,\n\t\t\tAlgorithm: sealed.AlgorithmAES256GCM,\n\t\t},\n\t}\n\tunsealedResponse, err := sealed.UnsealEventsResponse(sealedResult, keys)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Do something with unsealed response, e.g: send it back to the frontend.\n\tfmt.Println(unsealedResponse)\n}\n```\n\n## Webhook signing\n\nThis SDK provides utility method for verifing the HMAC signature of the incoming [webhook](https://dev.fingerprint.com/docs/webhooks) request.\nInstall the webhook dependency as below:\n```shell\ngo get github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk/webhook\n```\n\nThen you can use below code to verify signature:\n```go\npackage main\n\nimport (\n\t\"github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/v7/sdk/webhook\"\n)\n\nfunc main() {\n    // Your webhook signing secret.\n    secret := \"secret\"\n\n    // Request data. In real life scenario this will be the body of incoming request\n    data := []byte(\"data\")\n\n    // Value of the \"fpjs-event-signature\" header.\n    header := \"v1=1b2c16b75bd2a870c114153ccda5bcfca63314bc722fa160d690de133ccbb9db\"\n\n    isValid := webhook.IsValidWebhookSignature(header, data, secret)\n\n    if !isValid {\n        panic(\"Invalid signature\")\n    }\n}\n```\n\n\nTo learn more, refer to example located in [example/sealedResults.go](./example/sealedResults.go).\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *https://api.fpjs.io*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*FingerprintApi* | [**DeleteVisitorData**](docs/FingerprintApi.md#deletevisitordata) | **Delete** /visitors/{visitor_id} | Delete data by visitor ID\n*FingerprintApi* | [**GetEvent**](docs/FingerprintApi.md#getevent) | **Get** /events/{request_id} | Get event by request ID\n*FingerprintApi* | [**GetRelatedVisitors**](docs/FingerprintApi.md#getrelatedvisitors) | **Get** /related-visitors | Get Related Visitors\n*FingerprintApi* | [**GetVisits**](docs/FingerprintApi.md#getvisits) | **Get** /visitors/{visitor_id} | Get visits by visitor ID\n*FingerprintApi* | [**SearchEvents**](docs/FingerprintApi.md#searchevents) | **Get** /events/search | Get events via search\n*FingerprintApi* | [**UpdateEvent**](docs/FingerprintApi.md#updateevent) | **Put** /events/{request_id} | Update an event with a given request ID\n\n## Documentation For Models\n\n - [Botd](docs/Botd.md)\n - [BotdBot](docs/BotdBot.md)\n - [BotdBotResult](docs/BotdBotResult.md)\n - [BrowserDetails](docs/BrowserDetails.md)\n - [ClonedApp](docs/ClonedApp.md)\n - [DeprecatedGeolocation](docs/DeprecatedGeolocation.md)\n - [DeveloperTools](docs/DeveloperTools.md)\n - [Emulator](docs/Emulator.md)\n - [ErrorCode](docs/ErrorCode.md)\n - [ErrorPlainResponse](docs/ErrorPlainResponse.md)\n - [ErrorResponse](docs/ErrorResponse.md)\n - [EventsGetResponse](docs/EventsGetResponse.md)\n - [EventsUpdateRequest](docs/EventsUpdateRequest.md)\n - [FactoryReset](docs/FactoryReset.md)\n - [Frida](docs/Frida.md)\n - [Geolocation](docs/Geolocation.md)\n - [GeolocationCity](docs/GeolocationCity.md)\n - [GeolocationContinent](docs/GeolocationContinent.md)\n - [GeolocationCountry](docs/GeolocationCountry.md)\n - [GeolocationSubdivision](docs/GeolocationSubdivision.md)\n - [HighActivity](docs/HighActivity.md)\n - [Identification](docs/Identification.md)\n - [IdentificationConfidence](docs/IdentificationConfidence.md)\n - [IdentificationSeenAt](docs/IdentificationSeenAt.md)\n - [Incognito](docs/Incognito.md)\n - [IpBlocklist](docs/IpBlocklist.md)\n - [IpBlocklistDetails](docs/IpBlocklistDetails.md)\n - [IpInfo](docs/IpInfo.md)\n - [IpInfoAsn](docs/IpInfoAsn.md)\n - [IpInfoDataCenter](docs/IpInfoDataCenter.md)\n - [IpInfoV4](docs/IpInfoV4.md)\n - [IpInfoV6](docs/IpInfoV6.md)\n - [Jailbroken](docs/Jailbroken.md)\n - [LocationSpoofing](docs/LocationSpoofing.md)\n - [MitMAttack](docs/MitMAttack.md)\n - [ModelError](docs/ModelError.md)\n - [PrivacySettings](docs/PrivacySettings.md)\n - [ProductBotd](docs/ProductBotd.md)\n - [ProductClonedApp](docs/ProductClonedApp.md)\n - [ProductDeveloperTools](docs/ProductDeveloperTools.md)\n - [ProductEmulator](docs/ProductEmulator.md)\n - [ProductFactoryReset](docs/ProductFactoryReset.md)\n - [ProductFrida](docs/ProductFrida.md)\n - [ProductHighActivity](docs/ProductHighActivity.md)\n - [ProductIdentification](docs/ProductIdentification.md)\n - [ProductIncognito](docs/ProductIncognito.md)\n - [ProductIpBlocklist](docs/ProductIpBlocklist.md)\n - [ProductIpInfo](docs/ProductIpInfo.md)\n - [ProductJailbroken](docs/ProductJailbroken.md)\n - [ProductLocationSpoofing](docs/ProductLocationSpoofing.md)\n - [ProductMitMAttack](docs/ProductMitMAttack.md)\n - [ProductPrivacySettings](docs/ProductPrivacySettings.md)\n - [ProductProxy](docs/ProductProxy.md)\n - [ProductRawDeviceAttributes](docs/ProductRawDeviceAttributes.md)\n - [ProductRemoteControl](docs/ProductRemoteControl.md)\n - [ProductRootApps](docs/ProductRootApps.md)\n - [ProductSuspectScore](docs/ProductSuspectScore.md)\n - [ProductTampering](docs/ProductTampering.md)\n - [ProductTor](docs/ProductTor.md)\n - [ProductVelocity](docs/ProductVelocity.md)\n - [ProductVirtualMachine](docs/ProductVirtualMachine.md)\n - [ProductVpn](docs/ProductVpn.md)\n - [Products](docs/Products.md)\n - [Proxy](docs/Proxy.md)\n - [RawDeviceAttribute](docs/RawDeviceAttribute.md)\n - [RawDeviceAttributeError](docs/RawDeviceAttributeError.md)\n - [RelatedVisitor](docs/RelatedVisitor.md)\n - [RelatedVisitorsResponse](docs/RelatedVisitorsResponse.md)\n - [RemoteControl](docs/RemoteControl.md)\n - [RootApps](docs/RootApps.md)\n - [SearchEventsResponse](docs/SearchEventsResponse.md)\n - [SearchEventsResponseEvents](docs/SearchEventsResponseEvents.md)\n - [SuspectScore](docs/SuspectScore.md)\n - [Tampering](docs/Tampering.md)\n - [Tor](docs/Tor.md)\n - [Velocity](docs/Velocity.md)\n - [VelocityData](docs/VelocityData.md)\n - [VelocityIntervals](docs/VelocityIntervals.md)\n - [VirtualMachine](docs/VirtualMachine.md)\n - [Visit](docs/Visit.md)\n - [VisitorsGetResponse](docs/VisitorsGetResponse.md)\n - [Vpn](docs/Vpn.md)\n - [VpnConfidence](docs/VpnConfidence.md)\n - [VpnMethods](docs/VpnMethods.md)\n - [Webhook](docs/Webhook.md)\n - [WebhookClonedApp](docs/WebhookClonedApp.md)\n - [WebhookDeveloperTools](docs/WebhookDeveloperTools.md)\n - [WebhookEmulator](docs/WebhookEmulator.md)\n - [WebhookFactoryReset](docs/WebhookFactoryReset.md)\n - [WebhookFrida](docs/WebhookFrida.md)\n - [WebhookHighActivity](docs/WebhookHighActivity.md)\n - [WebhookIpBlocklist](docs/WebhookIpBlocklist.md)\n - [WebhookIpInfo](docs/WebhookIpInfo.md)\n - [WebhookJailbroken](docs/WebhookJailbroken.md)\n - [WebhookLocationSpoofing](docs/WebhookLocationSpoofing.md)\n - [WebhookMitMAttack](docs/WebhookMitMAttack.md)\n - [WebhookPrivacySettings](docs/WebhookPrivacySettings.md)\n - [WebhookProxy](docs/WebhookProxy.md)\n - [WebhookRemoteControl](docs/WebhookRemoteControl.md)\n - [WebhookRootApps](docs/WebhookRootApps.md)\n - [WebhookSuspectScore](docs/WebhookSuspectScore.md)\n - [WebhookTampering](docs/WebhookTampering.md)\n - [WebhookTor](docs/WebhookTor.md)\n - [WebhookVelocity](docs/WebhookVelocity.md)\n - [WebhookVirtualMachine](docs/WebhookVirtualMachine.md)\n - [WebhookVpn](docs/WebhookVpn.md)\n\n## Documentation For Authorization\n\n\n## ApiKeyHeader\n\n- **Type**: API key\n- **API key parameter name**: Auth-API-Key\n- **Location**: HTTP header\n\n## ApiKeyQuery\n\n- **Type**: API key\n- **API key parameter name**: api_key\n- **Location**: URL query string\n\n\n## Documentation for sealed results\n\n- [SealedResults](docs/SealedResults.md)\n- [DecryptionKey](docs/DecryptionKey.md)\n\n## Documentation for webhooks\n\n- [DecryptionKey](docs/Webhook.md)\n\n## Author\n\nsupport@fingerprint.com\n\n## Support and feedback\n\nTo report problems, ask questions, or provide feedback, please use [Issues](https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/issues). If you need private support, you can email us at [oss-support@fingerprint.com](mailto:oss-support@fingerprint.com).\n\n## License\n\nThis project is licensed under the [MIT license](https://github.com/fingerprintjs/fingerprint-pro-server-api-go-sdk/blob/main/LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffingerprintjs%2Ffingerprint-pro-server-api-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffingerprintjs%2Ffingerprint-pro-server-api-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffingerprintjs%2Ffingerprint-pro-server-api-go-sdk/lists"}