SMS Sending Issues with Azure Communication Services

Chase Dixon 20 Reputation points
2025-05-30T19:45:23.5566667+00:00

There is a challenge with SMS functionality using Azure Communication Services (ACS). A registered 10-digit phone number is in use, and messages are being sent from a .NET application. While most messages are sent successfully, an error occurs for some phone numbers:

Request parameter   is invalid.
Status: 400 (Bad Request)
ErrorCode: InvalidInput

Content:
{"error":{"code":"InvalidInput","message":"Request parameter   is invalid.","target":""}}

The SendClient.Send() method is being utilized, with the from, to, and message parameters all deemed valid. The phone numbers are US based in E.164 formatting (+19999999999).

What could be causing this error, and what troubleshooting steps can be taken?

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,236 questions
{count} votes

Accepted answer
  1. Bhargavi Naragani 5,575 Reputation points Microsoft External Staff Moderator
    2025-06-05T09:37:31.4266667+00:00

    Hi @Chase Dixon,

    Thank you for the follow-up! In addition to Alekhya Vaddepally,

    It seems like you're encountering a 400 - InvalidInput error when sending SMS messages via Azure Communication Services (ACS), despite using valid E.164-formatted, SMS-capable numbers.

    1. Even if the input appears correct, hidden characters like zero-width spaces or non-breaking spaces might be present in the to, from, or message fields. Ensure that all input strings are trimmed and normalized to remove any hidden characters. And logging the hexadecimal representation of each character can help identify any unexpected characters.
      https://learn.microsoft.com/en-us/dotnet/api/system.string.trim?view=net-9.0
      https://learn.microsoft.com/en-us/dotnet/api/system.string.normalize?view=net-9.0
    2. Some US carriers may block messages from 10DLC numbers if the campaign type doesn’t match your message content, Opt-in/consent isn't proven, if you're sending messages to VoIP numbers or landlines. Use services like NumVerify to check if the destination numbers are mobile and SMS-capable and make sure recipients have opted in to receive messages, and that this is documented.
    3. Messages may be rejected if they Contain sensitive keywords (e.g., "FREE", "WIN", "URGENT"), Exceed 160 characters for standard messages or 70 characters for messages containing Unicode characters or emojis. Ensure that the message content aligns with your approved campaign use case and doesn't contain prohibited keywords and keep messages within the allowed character limits. https://learn.microsoft.com/en-us/azure/communication-services/concepts/sms/sms-faq#what-is-the-sms-character-limit
    4. Even with an approved campaign, issues can arise if the campaign is not correctly linked to your 10DLC number or if the message content doesn't align with the registered use case. Check that your 10DLC number is associated with the correct campaign and that the campaign details accurately reflect your messaging use case. 10DLC registration guidelines
    5. To further investigate and handle intermittent issues, capture detailed logs of the parameters passed into the SendAsync() method, including correlation IDs and request payloads. Use exponential backoff strategies to retry failed requests, which can help with transient errors. Troubleshooting in Azure Communication Services

    If the issue persists after these steps, a backend investigation by Microsoft may be necessary. https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request Provide details such as failing phone numbers, timestamps, message IDs, and response payloads. https://portal.azure.com/#view/Microsoft_Azure_Support/HelpAndSupportBlade/~/overview

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    Let me know if you have any further Queries.


1 additional answer

Sort by: Most helpful
  1. Alekhya Vaddepally 1,670 Reputation points Microsoft External Staff Moderator
    2025-05-30T21:46:52.2566667+00:00

    Hi Chase Dixon
    Cross verifies number format confirm that: Numbers are formatted E.164 (eg, +1xxxxxxxxxxx).

    They do not have any invisible or non-publish characters (you can snatch or log the raw values before sending).

    Try to test the problem numbers using public phone number verification service or contact the recipient to ensure that: Number is SMS-capable, no landline or VoIP SMS is not blocked

    Ensure that your 10DLC number is fully registered with the Campaign Registry (TCR) and the campaign related to your use is approved. You can manage it through Azure's messaging compliance portal

    In your .NET app, enable more verbose logging around the SendClient.Send()method. From, and log in to the exact values from, to, and message. See anything suspect in rejected requests.

    If some failures are halted, applying the retrograde with the experiencedly backoff can help handle temporary downstream carrier issues.
    https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/sms/send?pivots=programming-language-csharp&tabs=windows
    https://learn.microsoft.com/en-us/azure/communication-services/concepts/troubleshooting-info?tabs=csharp%2Cjavascript%2Cdotnet
    if you have any further concerns or queries, please feel free to reach out to us.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.