onfido / api-python-client Goto Github PK
View Code? Open in Web Editor NEWThis is an auto-generated client library for Onfido's API
License: MIT License
This is an auto-generated client library for Onfido's API
License: MIT License
Hi, I am currently using the following to verify the X_Signature on the requests sent to our webhooks endpoint, however it is failing. I feel the documentation is not super clear on it, for instance does 'complete event payload' mean the payload part of the json object, or does it mean the full body of the request? Below is the code I am attempting to use at the moment however it is failing. If you could provide some example code or point out what I am doing wrong that would be great.
import hashlib
import hmac
import base64
# secret token as shown on the webhooks section of the dashboard
key = bytes(ck, 'utf-8')
# body = bytes(json.dumps(json.loads(body.decode())['payload']), 'utf-8')
message = body # request.body
digester = hmac.new(key=key, msg=message, digestmod=hashlib.sha3_224)
signature = digester.digest()
signature = base64.b64encode(signature).decode()
return signature
I noticed that Onfido has REST apis for live_videos: https://documentation.onfido.com/?python#live-videos , while this Python sdk doesn't have related apis.
Do you have any plan to support live_video in Python sdk? Before that I guess I have to call the REST api directly.
Appreciate for your answer.
I get the following with python 3.7.0 (3.6.6 works fine):
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import onfido
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/cris/.conda/envs/tge_dev/lib/python3.7/site-packages/onfido/__init__.py", line 28, in <module>
from .models.address import Address
File "/home/cris/.conda/envs/tge_dev/lib/python3.7/site-packages/onfido/models/__init__.py", line 32, in <module>
from .check_creation_request import CheckCreationRequest
File "/home/cris/.conda/envs/tge_dev/lib/python3.7/site-packages/onfido/models/check_creation_request.py", line 35
def __init__(self, type=None, redirect_uri=None, reports=None, report_type_groups=None, criminal_history_report_details=None, tags=None, suppress_form_emails=None, charge_applicant_for_check=None, brand_id=None, async=None):
^
SyntaxError: invalid syntax
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.