SMSClick HTTP SMS API Description.1.2a

Embed Size (px)

Citation preview

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    1/10

    HTTPSMSAPISPECIFICATION

    V.1.2A

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    2/10

    1.

    CONTENTS

    Contents1. CONTENTS ......................................................................................................................................... 2

    2. OVERVIEW......................................................................................................................................... 3

    3. PROTOCOL DESCRIPTION...................................................................................................................... 3

    3.1 Description .......................... ...................... ............................ .................... ........................... ... 3

    3.2 Examples............................. ...................... ............................ ................... ............................ ... !

    3.3 "##itional $al%es o& 'T(PE) parameter. ........................ ............................ ................... .............. *

    3.+ "PI error messa,es ta-le ......................... .......................... ......................... ........................... ...

    3.! /S0 Caracters ta-le............................ ............................ ....................... ........................ ...... 1

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    3/10

    2.

    OVERVIEW

    Tis #oc%ment speci&ies S0SClic 4TTP S0S "pi. Tis api is a $ersatile tool5 allo6in, %sers to

    #e$elop o6n applications %sin, almost an7 pro,rammin, lan,%a,e. "pi is extremel7 eas7 to %se

    on 6e- pa,es5 %sin, P4P pro,rammin, lan,%a,e.

    S0S "pi can %se -ot POST an# /ET meto# &or passin, parameters. POST meto# is %se#

    commonl7 6en passin, parameters &rom a 4T0L &orm5 6ile /ET meto# is similar to enterin,

    8RL in a 6e- -ro6ser.

    "ll parameters5 s%c as messa,e or %sername5 so%l# -e %rlenco#e#.

    3.

    PROTOCOL DESCRIPTION

    3.1Description

    S0SClic 4TTP S0S "pi %ses 4TTP POST meto# to ,et parameters. D%e to tis5 it is extremel7

    eas7 to #e$elop 4TTP pa,es allo6in, sen#in, o& sort text messa,es &rom -ro6ser5 %sin, &orms.

    4TTP POST re9%est consists o& t6o parts 4TTP re9%est part5 an# parameters.

    4TTP re9%est 8RL is

    SMSClick HTTPS SMS API URL

    https://pai!l.s"sclick.c#".$%/api.php&

    :or compati-ilit7 p%rposes5 ttp re9%est is also a$aila-le 6ito%t ssl

    SMSClick HTTP SMS API URL

    http://pai!l.s"sclick.c#".$%/api.php&

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    4/10

    Secon# part5 te parameters5 as se$eral parameters. 8SER an# P"SS parameters are

    man#ator75 an# are %se# &or a%tentication.

    SMSClick HTTP SMS API A'th!ticati#

    USER 8sername assi,ne# to in S0SClic S0S Portal

    ;case sensiti$e+!@@!33+322=+!@@!33+222

    RCPT can also -e a sin,le n%m-er.

    *%#'p "llo6s to sen# a messa,e to m%ltiple

    recipients in ,ro%p5 pre$io%sl7 #e&ine# in

    Smsclic 6e- inter&ace. /ro%p name so%l# -e

    pro$i#e# in /ID parameter

    Ex. T(PE>,ro%p?/ID>ome

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    5/10

    0essa,e to sen# so%l# -e pro$i#e# in 0S/ parameter. 0essa,e in plain "SCII can -e %p to 1@!

    caracters in len,t. "n7 nonAascii caracters ca%se te text to -e processe# as 8nico#e5 an#

    t%s sorten 0S/ car limit to * caracters.

    /S0 Carset is a$aila-le to $ie6 at te en# o& tis #oc%ment.

    3.2Examples:

    atest?P"SS>secret?T(PE>-%l?0S/>tis

    isatest?RCPT>+!@@!+33@!!

    "-o$e example 6ill ca%se sen#in, o& messa,e 'tis is a test) to recipient '+!@@!+33@!!). It)s

    sen#in, 6ill cost 1 cre#it.

    -test?P"SS>secret?T(PE>-%l?0S/>tis

    isatest?RCPT>+!33+@@!323=+!@@3223223

    "-o$e example 6ill ca%se sen#in, o& messa,e 'tis is a test) to recipients '+!33+@@!323) an#

    '+!@@3223223). Sen#in, o& tis messa,e 6ill cost 2 cre#its5 -eca%se tere are t6o recipients.

    ctest?P"SS>secret?T(PE>,ro%p?/ID>o

    me?0S/>tisisatest

    "-o$e example 6ill sen# messa,e 'tis is a test) to all recipients pre$io%sl7 #e&ine# in 'ome)

    ,ro%p. Total cost o& tis messa,e 6ill #epen# on n%m-er o& recipients containe# in tat ,ro%p.

    #< Sen#in, :L"S4 messa,es

    :L"S4 messa,es are messa,es appearin, on mo-ile screen imme#iatel7 a&ter

    recei$in,. To sen# &las messa,e a## :L"S4 parameter to api call5 an# set it)s $al%e

    to 1.

    ttpsBBpainel.smsclic.com.-rBapi.pp8SER>test?P"SS>secret?T(PE>-%l?0S/>tis

    isatest?RCPT>+!33+@@!323=+!@@3223223?:L"S4>1

    Tis example 6ill sen# messa,e 'tis is a test) to recipient '+!33+@@!323) an#

    '+!@@3223223) 6it &las option.

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    6/10

    e

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    7/10

    3.3

    Additional values of TYPE parameter.

    T(PE parameter can also -e %se# to o-tain oter in&ormation &rom api. Te ta-le -elo6 contains

    a$aila-le $al%es tat 'T(PE) parameter can a$e5 an# teir &%nctions.

    A++iti#al ,al'!s #( -T)PE pa%a"!t!%

    a'tht!st Ca%ses api to test $ali#it7 o& %sername an#

    pass6or# pro$i#e# in 8SER an# P"SS

    parameters.

    c%!+s Ret%rns n%m-er o& cre#its &or ,i$en S0SClic

    acco%nt

    *!t*%#'plist Ret%rns list o& ,ro%p names #e&ine# &or ,i$en

    S0SClic acco%nt.

    *%#'pa++ "llo6s to a## pone n%m-ers to ,ro%p &or

    ,i$en acco%nt. Taes t6o a##itional

    parameters

    /ID > ,ro%p name

    CONT > pone n%m-ers to a##5 separate# -7

    semicolons ;=,ro%p).

    NO RECIPIENTS RCPT parameter is empt7.

    NO MESSAE IVEN 0S/ parameter is empt7.

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    9/10

    NO ROUP NAME /ID parameter is empt7. 0essa,e ma7 -eret%rne# 6en sen#in, messa,e to m%ltiple

    n%m-ers5 6it 'T(PE>,ro%p) parameter5 or

    6en #eletin, ,ro%p5 %sin, 'T(PE>,ro%p#el)

    parameter.

    I NOT FOUN /ID parameter is in$ali#. Speci&ie# ,ro%p 6as

    not &o%n#. 0essa,e ma7 -e ret%rne# 6en

    sen#in, messa,e to m%ltiple n%m-ers %sin,

    'T(PE>,ro%p) parameter.

    NO I /ID parameter is empt7. 0essa,e ma7 -eret%rne# 6en a##in, ,ro%p %sin,

    'T(PE>,ro%pa##) parameter.

    NO ROUPS EFINE /ro%p list is empt7. 0essa,e ma7 -e ret%rne#

    6en ,ettin, ,ro%p list %sin,

    'T(PE>,et,ro%plist) parameter.

    ROUP 333 AE O0 /ro%p 6as a##e# o. 0essa,e res%ltin, &rom

    a##in, ,ro%p %sin, 'T(PE>,ro%pa##)parameter.

    ROUP 333 ELETE O0 /ro%p 6as #elete# s%ccess&%ll7. 0essa,e

    res%ltin, &rom #eletin, ,ro%p %sin,

    'T(PE>,ro%p#el) parameter.

    T)PE NOT RECONI6E 'T(PE) parameter 6as set to %nreco,niHe#

    $al%e.

    SEN FAIL Sen#in, o& messa,e &aile#. Te res%lt ma7 -e

    in$ali# pone n%m-er5 or ,ate6a7 &ail%re5

    6en accompanie# 6it '/"TEW"( :"IL8RE)

    messa,e.

    7A NUM7ER N%m-er pro$i#e# &or sen#in, 6as in$ali#.

    UP MS Te messa,e 6it ,i$en -%l i# 6as alrea#7

    sent. Tis error messa,e is &ollo6e# 6it

    o&&en#in, -%l i#. Sol%tion to tis error is to

    sen# messa,e a,ain5 to ,enerate ne6 -%l i#.

  • 8/12/2019 SMSClick HTTP SMS API Description.1.2a

    10/10

    SENT O0 0essa,e sen#in, 6as s%ccess&%l. Tis messa,e

    is &ollo6e# 6it -%l i# o& sentmessa,eBmessa,es.

    3.%&'( C)aracters ta$le

    SM Cha%act!%s ta$l!

    Cha%act!% Na"! H!3 c#+!

    89 N%m-ers 3A3

    a9;4 A96 "lpan%meric caracters @1A*"5 +1A!"

    8n#erscore !:

    . :%ll stop 2E

    ? Exclamation mar 21

    @ "steris 2"

    Caracters containe# in a-o$e ta-le are stan#ar# "SCII caracters. 0essa,e compose# o& tose

    caracters can a$e len,t %p to 1@! caracters. "ll oter caracters nee# to -e enco#e# 6en

    sen#in,5 t%s limitin, n%m-er o& a$aila-le caracters to *.