Skip to content

Commit 5ef8c09

Browse files
committed
adding urls to config file
1 parent ae329ad commit 5ef8c09

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

app/click/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from docusign_click import ApiClient
2-
2+
from ..ds_config import DS_CONFIG
33

44
def create_click_api_client(access_token):
55
"""Create Click API client and construct API headers"""
6-
api_client = ApiClient(host="https://demo.docusign.net/clickapi")
6+
api_client = ApiClient(host=DS_CONFIG["click_api_client_host"])
77
api_client.set_default_header(
88
header_name="Authorization",
99
header_value=f"Bearer {access_token}"

app/ds_config_sample.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# NOTE: You must add a Redirect URI of appUrl/ds/callback to your Integration Key.
1212
# Example: http://localhost:5000/ds/callback
1313
"authorization_server": "https://account-d.docusign.com",
14+
"click_api_client_host" : "https://demo.docusign.net/clickapi",
15+
"rooms_api_client_host" : "https://demo.rooms.docusign.com/restapi",
1416
"allow_silent_authentication": True, # a user can be silently authenticated if they have an
1517
# active login session on another tab of the same browser
1618
"target_account_id": None, # Set if you want a specific DocuSign AccountId,
@@ -39,6 +41,6 @@
3941

4042
EXAMPLES_API_TYPE = {
4143
"Rooms": False,
42-
"ESignature": False,
43-
"Click" : True
44+
"ESignature": True,
45+
"Click" : False
4446
}

app/rooms/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from docusign_rooms import ApiClient
2-
2+
from ..ds_config import DS_CONFIG
33

44
def create_rooms_api_client(access_token):
55
"""Create API client and construct API headers"""
6-
api_client = ApiClient(host="https://demo.rooms.docusign.com/restapi")
6+
api_client = ApiClient(host=DS_CONFIG["rooms_api_client_host"])
77
api_client.set_default_header(
88
header_name="Authorization",
99
header_value=f"Bearer {access_token}"

0 commit comments

Comments
 (0)