-1

I've created the trial account in Infobip and trying to send the SMS through the Python API to my registered phone number itself, and I'm not receiving the message but the response from the API is like this:

{'messages': [{'message_id': '3863980174574335976478',
               'status': {'description': 'Message sent to next instance',
                          'group_id': 1,
                          'group_name': 'PENDING',
                          'id': 26,
                          'name': 'PENDING_ACCEPTED'},
               'to': '+919999999999'}]}
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

2 Answers2

0

You taking response from an api directly. instead create a varibale in infobip like String or Interger type. infobip api block in second slide below u have to entervarible name in which response must be store for further use. You will also need to enter the path to the attribute.

{ "responseCode":200, "responseMessage":"success", "responseData":"{'messages': [{'message_id': '3863980174574335976478', 'status': {'description': 'Message sent to next instance', 'group_id': 1, 'group_name': 'PENDING', 'id': 26, 'name': 'PENDING_ACCEPTED'}, 'to': '+919999999999'}]}" } if above code is response from api and you want to fetch the name.

enter Your varible here: responseData.messages.name responseData.messages.name is the path for Name use bot operator to fetch the name.

0

Your account is in trial mode, so many countries restrict infobip from sending text messages to the country number in the trial account(india is one of them), so check country restrictions and make sure your sender ID is registered on the infobip portal.

if your country name is in country restriction list, please check it here https://www.infobip.com/docs/essentials/sms-coverage-and-connectivity

therefore you must register the Senderid in infobip portal, which allows you to send text messages even with a trial account.