webhook #2

Merged
cayop merged 5 commits from webhook into release 2024-06-14 14:20:18 +00:00
1 changed files with 28 additions and 0 deletions
Showing only changes of commit 5b5afa5c4c - Show all commits

View File

@ -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) - **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 ## Documentation
For detailed documentation, visit [Documentation Link](http://idhub.pangea.org/help/). For detailed documentation, visit [Documentation Link](http://idhub.pangea.org/help/).