Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: SMS auth error

Clémence Lesné92595b83bb6c
diff --git a/main.py b/main.py
index 716b735..ac85715 100644
--- a/main.py
+++ b/main.py
@@ -34,7 +34,6 @@ from azure.core.exceptions import (
)
from azure.core.messaging import CloudEvent
from azure.eventgrid import EventGridEvent, SystemEventNames
-from azure.identity import DefaultAzureCredential
from fastapi import FastAPI, status, Request, HTTPException, BackgroundTasks, Response
from fastapi.responses import JSONResponse, HTMLResponse
from helpers.config_models.database import ModeEnum as DatabaseModeEnum
@@ -106,7 +105,7 @@ call_automation_client = CallAutomationClient(
),
)
sms_client = SmsClient(
- credential=DefaultAzureCredential(),
+ credential=CONFIG.communication_service.access_key.get_secret_value(),
endpoint=CONFIG.communication_service.endpoint,
)