Skip to content

Commit 08bef73

Browse files
committed
Updating SIM Swap snippet vars in line with snippet spec
1 parent bdcdffa commit 08bef73

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.env.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ WHATSAPP_STICKER_URL='WHATSAPP_STICKER_URL'
4747

4848
# Identity Insights
4949
INSIGHT_NUMBER='INSIGHT_NUMBER'
50-
IDENTITY_INSIGHTS_PURPOSE='IDENTITY_INSIGHTS_PURPOSE'
50+
SIM_SWAP_PERIOD='SIM_SWAP_PERIOD'
5151
IDENTITY_INSIGHTS_API_HOST='api-eu.vonage.com'
5252

5353
# NI

identity-insights/get-sim-swap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
VONAGE_APPLICATION_ID = os.environ.get("VONAGE_APPLICATION_ID")
1111
VONAGE_PRIVATE_KEY = os.environ.get("VONAGE_PRIVATE_KEY")
1212
INSIGHT_NUMBER = os.environ.get("INSIGHT_NUMBER")
13-
IDENTITY_INSIGHTS_PURPOSE = os.environ.get("IDENTITY_INSIGHTS_PURPOSE")
13+
SIM_SWAP_PERIOD = os.environ.get("SIM_SWAP_PERIOD")
1414
IDENTITY_INSIGHTS_API_HOST = os.environ.get("IDENTITY_INSIGHTS_API_HOST")
1515

1616
from vonage import Auth, HttpClientOptions, Vonage
@@ -31,8 +31,8 @@
3131

3232
request = IdentityInsightsRequest(
3333
phone_number=INSIGHT_NUMBER,
34-
purpose=IDENTITY_INSIGHTS_PURPOSE,
35-
insights=InsightsRequest(sim_swap=SimSwapInsight(period=240)),
34+
purpose='FraudPreventionAndDetection',
35+
insights=InsightsRequest(sim_swap=SimSwapInsight(period=SIM_SWAP_PERIOD)),
3636
)
3737

3838
response: IdentityInsightsResponse = client.identity_insights.requests(request)

0 commit comments

Comments
 (0)