Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmileID Go SDK

SmileID Go SDK provides easy integration for Smile ID's digital identity verification, KYC, fraud prevention, and user authentication services for Africa.

Features

  • Digital KYC: Instant user onboarding and verification
  • Identity Verification: Support for 8500+ ID types, 220+ countries
  • User Authentication: Secure, real-time authentication
  • Seamless Integration: Simple, idiomatic Go API

Installation

go get github.com/nutcas3/smileid-go

Usage Example

First, import the package from the root:

import (
    "context"
    "context"
    "fmt"
    "log"
    "log"
    "github.com/nutcas3/smileid-go"
    "github.com/nutcas3/smileid-go/internal/identity"
    "github.com/nutcas3/smileid-go/internal/auth"
)

Digital KYC

ctx := context.Background()
client := smileid.NewClient(smileid.Config{
    APIKey:    "your-api-key",
    PartnerID: "your-partner-id",
    Env:       "sandbox",
    Env:       "sandbox",
})
kycReq := smileid.KYCRequest{
    CountryCode: "NG",
    IDType:      "NIN",
    IDNumber:    "12345678901",
    FirstName:   "Jane",
    LastName:    "Doe",
}
kycResp, err := client.KYC.VerifyUser(ctx, kycReq)
if err != nil {
    // Handle error
    log.Fatal(err)
}
fmt.Println(kycResp)

Identity Verification

idReq := smileid.VerificationRequest{
    CountryCode: "GH",
    IDType:      "PASSPORT",
    IDNumber:    "A1234567",
}
idResp, err := client.Identity.VerifyID(ctx, idReq)
if err != nil {
    log.Fatal(err)
}
fmt.Println(idResp)

User Authentication

authReq := auth.AuthRequest{
    UserID:   "user-123",
    Event:    "login",
    DeviceID: "device-abc",
}
authResp, err := client.Authentication.Authenticate(ctx, authReq)
if err != nil {
    log.Fatal(err)
}
fmt.Println(authResp)

Error Handling

All API methods return detailed errors. Use Go's error wrapping/unwrapping to inspect and handle errors.


Documentation

See docs for full API reference and integration guides.


© 2025 Smile ID. All rights reserved.

About

Smile ID sdk for Golang

Topics

Resources

Stars

14 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages