0

URL:

https://{org-url}/sms/v1/messageContact/{message-key}/send

Request Body:

{
    "Subscribers": [
        {
            "MobileNumber": "91##########",
            "SubscriberKey": "12z3x5v7",
            "Attributes": {
                "FirstName": "Trung",
                "LastName": "Doe"
            }
        }
    ],
    "Subscribe": "true",
    "Resubscribe": "true",
    "SendTime": "2020-07-22 20:00",
    "Override": "false",
    "keyword": "XXXX"
}

Response Obtained: 400 Bad Request

{
    "errors": [
        "No valid subscribers were provided."
    ]
}

I'm getting this response back when I try to send an sms using sales force's REST API. I'm not sure what's going wrong, I followed the approach given in the documentation.

SMS is not getting triggered to India Mobile number, works for US mobile numbers. Can anybody help me with this?

  • Welcome to SFSE - please use the {} tool or triple backticks (```) to format your code blocks. – David Reed Jul 27 at 3:36
  • @DavidReed, Thanks, will keep in mind next time I post a question. – sabari Jul 27 at 4:07
  • I was able to make this work by including the "keyword" parameter, but, now I'm getting n error saying "No valid subscribers were provided" if I give my India number, works for US numbers though. Any suggestions on what I should try? – sabari Jul 27 at 4:09
  • Please edit your post to include this information. On SFSE, comments are temporary and are used primarily to request clarification. Thank you! – David Reed Jul 27 at 4:15
  • 1
    Have you verified that your Mobile Studio is enabled to send to India? (help.salesforce.com/…) – Gortonington Jul 27 at 12:46
-2

Your mobile number seems to be in the wrong format. It must conform to ISO-3306-1 alpha-2 standards (as per the sfdc link you've shared). See here for the example codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.