Skip to content

Instantly share code, notes, and snippets.

@symisc
Last active January 3, 2023 02:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save symisc/a6458d9b670d57b6a9c107fe1ad46660 to your computer and use it in GitHub Desktop.
Save symisc/a6458d9b670d57b6a9c107fe1ad46660 to your computer and use it in GitHub Desktop.
Perform authenticity check of a given Facial ID - Refer to the FACEIO documentation at https://faceio.net/rest-api for additional information
import requests
import json
# Perform authenticity check of a given Facial ID.
# In other words, make sure the supplied Facial ID is valid & registered on this FACEIO application.
# Refer to https://faceio.net/rest-api for additional information
req = requests.get('https://api.faceio.net/checkfacialid',params={
"fid":"FACIAL_ID", # Target Facial ID being checked
"key": "FACEIO_APP_API_KEY" # Your FACEIO Application API Key. Retrieve this key from the Application Manager on the console at: https://console.faceio.net
})
reply = req.json()
if reply['status'] != 200:
print (reply['error'])
exit()
# log the result
isValid = reply['valid'] # True if the supplied Facial ID is valid. False otherwise
print(f"is Valid Facial ID?: {isValid}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment