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.
- Even if the input appears correct, hidden characters like zero-width spaces or non-breaking spaces might be present in the
to
,from
, ormessage
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 - 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.
- 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
- 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
- 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.