Send SMS from template with Unix

Send an SMS template using HTTP with Unix


Example in Unix:

wget -qO- "https://www.afilnet.com/api/http/?class=sms&method=sendsmsfromtemplate&user=AFILNET_USER&password=AFILNET_PASSWORD&to=AFILNET_TO&idtemplate=AFILNET_IDTEMPLATE¶ms=AFILNET_PARAMS&scheduledatetime=AFILNET_SCHEDULEDATETIME&output=AFILNET_OUTPUT"



See example in:

PHP Java C Sharp Unix Ruby on rails Python Android Objective C / iPhone SQL Server Oracle Node JS Go lang Scala lang Swift


Send an SMS with the content of the indicated template


ParameterDescriptionCompulsory / Optional
class=smsClass requested: Class to which the request is madeCompulsory
method=sendsmsfromtemplateClass method requested: Method of the class to which the request is madeCompulsory
userUser and e-mail of your Afilnet accountCompulsory
passwordPassword of your Afilnet accountCompulsory
toDestination mobile numberCompulsory
idtemplateTemplate IDCompulsory
paramsParameters to be replaced in the template for customization (<>), separated by , (commas)Optional
scheduledatetimeDelivery date and time in yyyy-mm-dd hh:mm:ss formatOptional
outputOutput format of the resultOptional

When you make requests you will receive the following fields:

  •  status
  •  result (if status=success), here you will receive the following values:
    • messageid
    • credits
  •  error (if status=error), here you will receive the error code

The possible error codes are listed below

CodeDescription
MISSING_USERUser or email not included
MISSING_PASSWORDPassword not included
MISSING_CLASSClass not included
MISSING_METHODMethod not included
MISSING_COMPULSORY_PARAMCompulsory parameter not included
INCORRECT_USER_PASSWORDIncorrect user or password
INCORRECT_CLASSIncorrect class
INCORRECT_METHODIncorrect method
NO_ROUTE_AVAILABLEThere are no available paths for the indicated destination
NO_CREDITSYour balance is insufficient
NOT_ACCESS_TO_TEMPLATEYou haven't access to the selected template
Parameters:
  • class: sms
  • method: sendsmsfromtemplate
  • user: user
  • password: password
  • to: 34600000000
  • idtemplate: 1000
  • params: mobile:123456789,name:test+name
  • scheduledatetime:
  • output:
Request:
https://www.afilnet.com/api/http/?class=sms&method=sendsmsfromtemplate&user=user&password=password&to=34600000000&idtemplate=1000¶ms=mobile:123456789,name:test+name&scheduledatetime=&output=
IMPORTANT INFORMATION ABOUT COOKIES: If you continue to use this web we will assume that you accept the terms of use. You will find more information in our Cookies Policy. Continue