01-17-2024 04:44 AM
Hi Team, I am using below code in my solution with the trial account I have but am unable to place voice call and getting 400 error each time. Please advise:
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api-sandbox.imiconnect.io/v1/voice/messages");
request.Headers.Add("Authorization", {my authorization key});
request.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());
var content = new StringContent("{\n \"callerId\": \"+15204575696\",\n \"dialedNumber\": \"{my indian telephone number}\",\n \"audio\": {\n \"type\": \"TTS\",\n \"loop\": 3,\n \"style\": \"STANDARD\",\n \"gender\": \"FEMALE\",\n \"engine\": \"AZURE\",\n \"text\": \"Hello\",\n \"textFormat\": \"TEXT\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
01-16-2024 12:48 AM
Hi Team, I am using below code in my solution with the trial account I have but am unable to place voice call and getting 400 error each time. Please advise:
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api-sandbox.imiconnect.io/v1/voice/messages");
request.Headers.Add("Authorization", {my authorization key});
request.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());
var content = new StringContent("{\n \"callerId\": \"+15204575696\",\n \"dialedNumber\": \"{my indian telephone number}\",\n \"audio\": {\n \"type\": \"TTS\",\n \"loop\": 3,\n \"style\": \"STANDARD\",\n \"gender\": \"FEMALE\",\n \"engine\": \"AZURE\",\n \"text\": \"Hello\",\n \"textFormat\": \"TEXT\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
01-23-2024 05:11 AM
Hi @kmehta - Please use NEURAL as value for the TTS style configuration. The above request is failing because STANDARD voice option is being retired. Let me know if you continue to face any issues after making this change.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide