From 6ef41d238925b698f75e8e391816faffb9f6152a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 14 Jun 2024 15:50:36 +0200 Subject: [PATCH] update README --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 353f7b4..3757eb7 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,34 @@ IdHub's repository is organized into several directories, each serving a specifi - **utils**: A utility folder containing various helper scripts and tools developed by us but that are independent of idHub. Even so, IdHub uses them and needs them (examples of this are the validation system for the data that is loades by excel, or the system that manages the sskit) +## Webhook +You need define a token un the admin section "/webhool/tokens" +For define one query here there are a python example: +``` + import requests + import json + + url = "https://api.example.com/users" + data = { + "type": "credential", + "data": { + '@context': ['https://www..... + } + + headers = { + "Authorization": f"Bearer {token}", + "Content-Type": "application/json" + } + + response = requests.post(url, headers=headers, data=json.dumps(data)) + + response.status_code == 200 + response.json() + +``` + The response of verification can be ```{'status': 'success'}``` or ```{'status': 'fail'}``` + If no there are *type* in data or this is not a *credential* then, the verification proccess hope a *presentation* + ## Documentation For detailed documentation, visit [Documentation Link](http://idhub.pangea.org/help/).