Skip to content

Commit 987fec2

Browse files
committed
specify required parameter
1 parent 2b05f4e commit 987fec2

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

examples/getting-started/conversation/send_handle_incoming_sms/.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ SINCH_KEY_ID=
44
SINCH_KEY_SECRET=
55

66
# Conversation API: existing app (already created and configured for SMS).
7-
# Set SINCH_CONVERSATION_REGION to the same region as the one your app was created in (e.g. eu).
7+
# SINCH_CONVERSATION_REGION is required.
8+
# Set it to the same region as the one your app was created in (e.g. eu).
89
CONVERSATION_APP_ID=
910
SINCH_CONVERSATION_REGION=
1011

examples/getting-started/conversation/send_handle_incoming_sms/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ def load_config():
2323
port = int(config.get("SERVER_PORT") or "3001")
2424
app_id = config.get("CONVERSATION_APP_ID") or ""
2525
webhooks_secret = config.get("CONVERSATION_WEBHOOKS_SECRET") or ""
26-
conversation_region = config.get("SINCH_CONVERSATION_REGION") or ""
26+
conversation_region = (config.get("SINCH_CONVERSATION_REGION") or "").strip()
2727
if not conversation_region:
2828
raise ValueError(
29-
"SINCH_CONVERSATION_REGION is required in .env "
29+
"SINCH_CONVERSATION_REGION is required in .env to provide all parameters needed for Conversation API requests. "
3030
"Set it to the same region as the one your Conversation API app was created in (e.g. eu)."
3131
)
3232

0 commit comments

Comments
 (0)