send SMS in xml format via an SMSC Http Connection | ![]() |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ |
◄ ► |
Author | Message | |||
server tunca New member Username: Servertunca Post Number: 1 Registered: 11-2023 |
Hello. We are using nowsms v2022.10.03. We want to send SMS in xml format via an SMSC Connection accessed via https address. Is there such a sending support? What needs to be done in the existing http Connection settings? Can you provide information? We will post an XML like the one below from our application and send it to nowsms and forward it to the GSM operator via the SMSC http connection defined in nowsms. When defining http smsc, URL template Text and URL Template Binary fields are required fields. SMSc definition cannot be made without entering the necessary parameters in these fields. Which parameters should be entered in these fields to be able to send xml content? <?xml version="1.0" encoding="utf-8"?> <KURUMSALSMS> <USERNAME>XXX</USERNAME > <PASSWORD>XXX</PASSWORD> <GSMNO>XXX</GSMNO> <START_DATE>ddMMyyyyHHmm</START_DATE> <END_DATE>ddMMyyyyHHmm</END_DATE> <SMSHEADER>XXXX</SMSHEADER> <SMS_TYPE>TX/BIN/F_TX/UC/TR_TX</SMS_TYPE> <SMS_MESSAGE>XXX</SMS_MESSAGE> <PARTNER_CODE>XXX</PARTNER_CODE> <URL>XXX</URL> <MESSAGE_ID>X</MESSAGE_ID> <IS_AVEA>true</IS_AVEA> <BRANDCODE>XXXXXX</BRANDCODE> <RECIPIENTTYPE>BIREYSEL/TACIR</RECIPIENTTYPE> <ISNOTIFICATION>false/true</ISNOTIFICATION> </KURUMSALSMS> | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8559 Registered: 10-2002 |
To create a custom HTTP POST template for an HTTPSMSC connection, create or update an HTTPSMSC directory under the NowSMS directory (e.g., /var/lib/nowsms/HTTPSMSC in Linux or \Program Files (x86)\NowSMS/HTTPSMSC in Windows). Under this HTTPSMSC directory create a directory for your custom connection. For example, HTTPSMSC/KURUMSAL As a starting point, add these 2 files to HTTPSMSC/KURUMSAL TEMPLATE.INI: [Send] HostName=server.name HostPort=80 UseSSL=No UseKeepAlive=Yes LongTextAsText=Yes UnicodeAsText=Yes HTTPUseAuth=No SENDTEXT.TXT POST /URI HTTP/1.1 Content-Type: application/xml <?xml version="1.0" encoding="utf-8"?> <KURUMSALSMS> <USERNAME>@@UserName@@</USERNAME > <PASSWORD>@@Password@@</PASSWORD> <GSMNO>@@PhoneNumber@@</GSMNO> <START_DATE>ddMMyyyyHHmm</START_DATE> <END_DATE>ddMMyyyyHHmm</END_DATE> <SMSHEADER>XXXX</SMSHEADER> <SMS_TYPE>TX/BIN/F_TX/UC/TR_TX</SMS_TYPE> <SMS_MESSAGE>@@Text@@</SMS_MESSAGE> <PARTNER_CODE>XXX</PARTNER_CODE> <URL>XXX</URL> <MESSAGE_ID>@@MessageID@@</MESSAGE_ID> <IS_AVEA>true</IS_AVEA> <BRANDCODE>XXXXXX</BRANDCODE> <RECIPIENTTYPE>BIREYSEL/TACIR</RECIPIENTTYPE> <ISNOTIFICATION>false/true</ISNOTIFICATION> </KURUMSALSMS> Change /URI to the path part of the POST URL. Many of the XML parameters are specific to this SMS provider, so I am uncertain which parameters are required. Add an HTTP SMSC connection and for "Server Type" select the HTTPSMSC directory that you created above (KURUMSAL). What are example response for success or failure from this server? There are some additional configuration settings for parsing the server response to determine if the request was ok. For example, does the server report back an XML element with a message ID? NowSMS can parsee the response and assume failure if this XML element is missing from the response. Add MessageIDResponseXML=xmlmessid to template.ini if the message id is returned in <xmlmessid> For other options of determining success or failure, please explain more about the expected responses from the service provider. | |||
server tunca New member Username: Servertunca Post Number: 2 Registered: 11-2023 |
Hello. Thank you for your answer. Will the following parameters in the sendtext.txt file be the information sent by the service provider or will they be the user information to be opened via nowsms? <USERNAME>@@UserName@@</USERNAME > <PASSWORD>@@Password@@</PASSWORD> | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8560 Registered: 10-2002 |
Values configured for the service provider. | |||
server tunca New member Username: Servertunca Post Number: 3 Registered: 11-2023 |
Hello I am testing from the postname application. I am sending the values you provided as @@parameter@@ in xml to my nowsms installed server with the post method. In order to access my nowsms application, I created a user in nowsms with the same username and password information provided by the service provider. I am sending this information but I am getting an error as in the screenshot. Why am I getting such an error? ![]() | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8563 Registered: 10-2002 |
That error is coming from NowSMS. It does not recognize the Username and/or Password that is being passed in the URL parameters, which should match a user account defined under "SMS Users". This is logically different from the user account @@UserName@@ in the HTTP POST, which is the account on the provider defined in the SMSC configuration. |