Last active
January 3, 2023 02:13
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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