Skip to main content

FACEKI KYC Api Library

Project description

FacekiAPIClientV2

The FacekiAPIClientV2 is a Python client for interacting with the Faceki API. It provides methods to generate an access token, perform various KYC (Know Your Customer) operations, and retrieve KYC records.

Installation

You can install FacekiAPIClientV2 using pip:

pip install facekiapiclientv2

Usage

import requests
from facekiapiclientv2 import FacekiAPIClientV2

client_id = 'your_client_id'
client_secret = 'your_client_secret'
api_client = FacekiAPIClientV2(client_id, client_secret)

# Generate an access token
api_client.generate_token()

# Get KYC rules
kyc_rules = api_client.getKYCRules()

# Perform a KYC verification
selfie_image = 'path_to_selfie_image.jpg'
id_front_image = 'path_to_id_front_image.jpg'
id_back_image = 'path_to_id_back_image.jpg'
dl_front_image = 'path_to_dl_front_image.jpg'
dl_back_image = 'path_to_dl_back_image.jpg'
pp_front_image = 'path_to_pp_front_image.jpg'
pp_back_image = 'path_to_pp_back_image.jpg'

result = api_client.requestKYC(selfie_image, id_front_image, id_back_image,
                               dl_front_image, dl_back_image, pp_front_image,
                               pp_back_image)

# Get KYC verification summary
kyc_summary = api_client.getKycSummary()

# Generate a KYC verification link
expire_time = 0
application_id = 'your_application_id'
redirect_url:'https://xyz.com',
document_optional:True If you want customer to choose between document and False if you want customer to provide all document
require_additional_doc: True if you want customer to provide Additional Document (POA) and False if you dont want customer to provide Additional Doc


link = api_client.generateKYCLink(expire_time, application_id,redirect_url,document_optional,require_additional_doc)

# Get KYC records By Link
link_id = 'your_link_id'
kyc_records = api_client.getKYCrecordsByLink(link_id)

# Get KYC records By Reference Id
referenceId = 'record_referenceId'
kyc_records = api_client.getKYCRecordByReference(referenceId)

# Get KYC records By Reference Id
requestId = 'record_requestId'
kyc_records = api_client.getKYCRecordByRequestId(requestId)


# Perform a face check
selfie_image = 'path_to_selfie_image.jpg'

result = api_client.faceCheck(selfie_image)

Exception Handling

The FacekiAPIClientV2 class may raise exceptions in case of errors. Ensure that you handle these exceptions appropriately in your code. Examples of possible exceptions include:

  • requests.exceptions.RequestException: Raised when there is an issue with making a request to the Faceki API.
  • Exception: Raised for various errors such as failed token generation or failed requests.

Disclaimer

Please note that this client code is provided as a starting point and may require modifications or updates depending on the Faceki API's specific requirements or changes. Refer to the Faceki API documentation for detailed information about the API's endpoints, request/response structures, and authentication requirements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

facekiapiclientv2-1.3.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

facekiapiclientv2-1.3-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page