Skip to main content
Version: Go

Quickstart

This guide will help you get started with the KYC Match API using Go. You will learn how to initialize the SDK, send a KYC Match request, and handle the response.

Prerequisites

Before you begin, you need to have the following:

  • subscribe to the KYC Match service, (guide here)
  • Go 1.16 or higher

Step 1: Get your API Credentials

To get your API Credentials, you can go to the KYC Match Product Page and click on "Manage on Provider" to access the service dashboard. For a full guide on how to get your credentials, you can refer to the Registration guide.

Step 2: Create a new project

Create a new directory for your project and initialize a Go module:

mkdir kyc-match-test
cd kyc-match-test
go mod init kyc-match-test

Step 3: Install the SDK

go get github.com/GlideApis/sdk-go

Step 4: Send a KYC Match request

Create a new file main.go and initialize the SDK with your API credentials:

main.go
package main

import (
"context"
"fmt"
"log"

"github.com/GlideApis/sdk-go/pkg/glide"
"github.com/GlideApis/sdk-go/pkg/types"
)

func main() {
client, err := glide.NewGlideClient(types.GlideSdkSettings{
ClientID: "<client_id>",
ClientSecret: "<client_secret>",
})
if err != nil {
// handle error
return
}

userClient, err := client.KYCMatch.For(types.PhoneIdentifier{
PhoneNumber: "+555123456789",
})
if err != nil {
// handle error
return
}
props := types.KYCMatchProps{
PhoneNumber: "+555123456789",
IDDocument: "66666666q",
Name: "Federica Sanchez Arjona",
GivenName: "Federica",
FamilyName: "Sanchez Arjona",
NameKanaHankaku: "federica",
NameKanaZenkaku: "Federica",
MiddleNames: "Sanchez",
FamilyNameAtBirth: "YYYY",
Address: "Tokyo-to Chiyoda-ku Iidabashi 3-10-10",
StreetName: "Nicolas Salmeron",
StreetNumber: 4,
PostalCode: 1028460,
Region: "Tokyo",
Locality: "ZZZZ",
Country: "Japan",
HouseNumberExtension: "VVVV",
Birthdate: "1978-08-22",
Email: "[email protected]",
Gender: "male",
}

response, err := userClient.Match(props, types.ApiConfig{})
if err != nil {
log.Fatal(err)
}

fmt.Printf("Match result: %+v\n", response)
}

To execute this you can the following from a terminal in the directory of your code:

go run main.go