Skip to content

Commit be318d8

Browse files
committed
Fixed authorization token for the webhooks list method
1 parent 85a7f32 commit be318d8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/101_invite_webhook_download.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
# Create webhook to send POST to custom endpoint when document is signed
5151
webhook_response = signnow_python_sdk.Webhook.create(access_token['access_token'], webhook_payload)
5252

53+
# List available webhooks
54+
list_webhooks = signnow_python_sdk.Webhook.list_all(access_token['access_token'])
55+
5356
# Send signature invite
5457
invite_response = signnow_python_sdk.Document.invite(access_token['access_token'], document_id['id'], invite_payload)
5558

signnow_python_sdk/webhook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def list_all(access_token):
1515
dict: A dictionary representing the JSON data of the event subscriptions or the error returned by the API.
1616
"""
1717
response = get(Config().get_base_url() + '/api/v2/events', headers={
18-
"Authorization": "Bearer " + access_token,
18+
"Authorization": "Basic " + Config().get_encoded_credentials(),
1919
"Accept": "application/json"
2020
})
2121

0 commit comments

Comments
 (0)