GETTING STARTED

What is Youphoric SMS API?

Youphoric SMS API is a service that will allow developers to create SMS applications to send and receive messages to and from Smart subscribers. This service aims to help developers deploy their app quickly and make SMS services accessible to both international and provincial developers and partners.
To view Youphoric apigee console please click 'CREATE YOUR APP'
  1. Register - to start using the Youphoric SMS API.
  • Registration Information
    • Username - must be unique
    • Password -must be alphanumeric
    • Name – must be full name
    • Email - a valid Email address
    • Address
    • Contact No - complete with country code and mobile number
    • *All fields must be filled out
  • Verify via Email
    • A verification message will be sent to the email address provided during registration
DEVELOPING KEYWORD-BASED APP
  • Developers may use a set of pre-defined keywords that is suited for their app. These keywords are:
    • DAILY – for daily subscription
    • WKLY – for weekly subscription
    • NOW – for infotext
    • NOTE – for notification subscription
    • VOTE – for polling/surveys
    • TRIVIA – for trivia
    • PROMO – for promo
    • CS – for customer feedback
    • COUPON – for coupon subscription
    • REDEEM – for claiming rewards
DEVELOPING APPS USING ACCESS CODE + ID
  • Developer may use available Access Code + ID that they want to use for their app. Available Access Code + IDs are:
    • 68001
    • 68002
    • 68003
    • 68004
    • 68005
    • 68006
    • 68007
    • 68008
    • 68009
DEVELOPING AND INTEGRATING YOUR APP
  • Registering your apps
    • Perform basic authentication to add an app as shown below:
    • After the authentication, the developer needs to provide the following:
      • FOR KEYWORD-BASE APPS
        1. Keyword -developer must choose a keyword, to define the type of service. Choose from these keywords:
          • DAILY
          • WKLY
          • NOW
          • NOTE
          • VOTE
          • TRIVIA
          • PROMO
          • CS
          • COUPON
          • REDEEM
    1. Service name- should be composed of alphanumeric characters, no space. The service name is the dynamic secondary keyword. It must be unique with 4 to 11 characters only. The developer will be notified if the service name is already used / existing.
    1. Service description – a brief description of what the service is and how it works
    1. Service URL – the location of your app (where your app is hosted)
    • FOR APPS USING ACCESS CODE +ID
    1. Access Code +ID - The developer must choose an access code + id. Available Access Code + IDs are:
      • 68001
      • 68002
      • 68003
      • 68004
      • 68005
      • 68006
      • 68007
      • 68008
      • 68009
    1. Service name- should be composed of alphanumeric characters, no space. The service name is the dynamic keyword. It must be unique with 4 to 11 characters only. The developer will be notified if the service name is already used / existing.
    1. Service description - a brief description of what the service is and how it works
    1. Service URL - the location of your app (where your app is hosted)
  • CODING YOUR APP

    • For keyword-based apps - Use the following syntax, variables and reply message format for each keyword:
      Condition Response
      DAILY [service] ON / IN / YES / GO / OO
      Remarks: Reply Must contain subscription confirmation and content. Example:
      DAILY [service]: Thank you for subscribing. P2.5/tx [Welcome Message] [content]
      WKLY [service] ON / IN / YES / GO / OO
      Remarks: Reply Must contain subscription confirmation and content. Example:
      WKLY [service]: Thank you for subscribing. P2.5/tx [Welcome Message] [content]
      Receiving [schedule] push [Service] [content]
      DAILY [Service] OFF / REMOVE / CANCEL / STOP/ QUIT
      Remarks: Reply Must contain unsubscription confirmation. Example:
      DAILY [service]: You have unsubscribed for free. You will no longer receive daily content. To subscribe again, text DAILY [Service] ON to 6800. P2.5/tx
      WKLY [Service] OFF / REMOVE / CANCEL / STOP/ QUIT
      Remarks: Reply Must contain unsubscription confirmation. Example:
      WKLY [service]: You have unsubscribed for free. You will no longer receive daily content. To subscribe again, text WKLY [Service] ON to 6800. P2.5/tx
      DAILY [Service] HELP
      Remarks: Must contain How to subscribe and unsubscribe
      DAILY [Service] ON to subscribe DAILY [Service] OFF to unsubscribe to6800.P2.5/tx
      WKLY [Service] HELP
      Remarks: Must contain How to subscribe and unsubscribe
      WKLY [Service] ON to subscribe WKLY [Service] OFF to unsubscribe to6800.P2.5/tx
      STOP ALL
      If with subscription:
      DdMmm XXXX: Your deactivation request is currently being processed. This message is free of charge. Ref:XXXXXXXXXXXX You have unsubscribed from all 6800 services.
      If without subscription:
      DdMmm XXXX: Your deactivation request is currently being processed. This message is free of charge. Ref:XXXXXXXXXXXX You are not subscribed to any 6800 service.
      ERROR and CONDITIONAL MESSAGES
      For already subscribed (double opt-in)

      DAILY [Service]: You are already subscribed. Txt DAILY [Service] OFF unsubscribe for free. Send to 6800.

      WKLY [Service]: You are already subscribed. Txt WKLY [Service] OFF unsubscribe for free. Send to 6800.

      For already unsubscribed (double opt-out)

      DAILY [Service]: You are not subscribed. Text DAILY [Service] ON to 6800 to subscribe.P2.5/tx

      WKLY [Service]: You are not subscribed. Text WKLY [Service] ON to 6800 to subscribe.P2.5/tx

      Condition Response
      NOW [Service] [Second Keyword] NOW [Service] [Second Keyword] [content]
      Condition Response
      NOTE [Service] REG [name],[address],[gender],[age] NOTE [Service]: You have successfully registered. P2.5/tx [Welcome Message]
      NOTE [Service] ON / IN / YES / GO / OO
      Remarks: Reply Must contain subscription confirmation and content. Example:
      NOTE [Service Name]: Thank you for subscribing. P2.5/tx [Welcome Message] [content]
      Sample Push NOTE [Service] [content]
      NOTE [Service] OFF / REMOVE / CANCEL / STOP/ QUIT
      Remarks: Reply must contain unsubscription confirmation. Example:
      You have unsubscribed to NOTE [Service] for free. You will no longer receive notifications. To subscribe again, text NOTE [Service] ON to 6800.P2.5/tx
      NOTE [Service] HELP
      Remarks: Must contain How to subscribe and unsubscribe.
      NOTE [Service] ON to subscribe
      NOTE [Service] OFF unsubscribe to6800.P2.5/tx
      ERROR and CONDITIONAL MESSAGES
      For incorrect registration NOTE [Service]: Incorrect registration. Text Note [Service] REG [name], [address], [gender], [age] to 6800.P2.5/tx
      For already registered MIN

      NOTE [Service]: Mobile number is already registered.P2.5/tx

      For already subscribed (double opt-in) NOTE [Service]: You are already subscribed. P2.5/tx Txt NOTE [Service] OFF unsubscribe for free. Send to 6800.
      For already unsubscribed (double opt-out) NOTE [Service]: You are not subscribed. Text NOTE [Service] ON to 6800 to subscribe.P2.5/tx
      Condition Response
      VOTE [Service] REG [name],[address],[gender],[age] VOTE [Service]: You have successfully registered.P2.5/tx [Welcome Message]
      VOTE [Service] [VOTE] VOTE [Service]: You have sent your vote for [vote].P2.5/tx
      VOTE [Service] HELP

      VOTE [Service] REG [name],[address],[gender],[age]to register

      VOTE [Service] [vote] to 6800. P2.5/tx

      ERROR and CONDITIONAL MESSAGES
      For incorrect registration VOTE [Service]: Incorrect registration. Text VOTE [Service] REG [name], [address], [gender], [age] to 6800.P2.5/tx
      For already registered MIN

      VOTE [Service]: Mobile number is already registered. P2.5/tx

      Condition Response
      TRIVIA [Service] REG [name],[address],[gender],[age] TRIVIA [Service]: You have successfully registered.P2.5/tx [Welcome Message]
      TRIVIA [Service] TRIVIA [Service]: [Welcome Message] [Content/Trivia Question] P2.5/tx
      TRIVIA [Service] [Answer]
      (correct answer)

      TRIVIA [Service]: Your answer is correct! [Content] P2.5/tx

      TRIVIA [Service] [Answer]
      (incorrect answer)

      TRIVIA [Service]: Incorrect answer. [Content] P2.5/tx

      TRIVIA [Service] HELP

      TRIVIA [Service] REG [name],[address],[gender],[age]to register

      TRIVIA [Service] to receive trivia questions to 6800. P2.5/tx

      ERROR and CONDITIONAL MESSAGES
      For incorrect registration TRIVIA [Service]: Incorrect registration. Text TRIVIA [Service] REG [name], [address], [gender], [age] to 6800.P2.5/tx
      For already registered MIN

      TRIVIA [Service]: Mobile number is already registered. P2.5/tx

      Answer to trivia question before registration

      TRIVIA [Service]: To start answering trivia, send TRIVIA [Service] REG [name],[address],[gender],[age] to register to 6800.P2.5/tx

      Condition Response
      PROMO [Service] REG [name],[address],[gender],[age] PROMO [Service]: You have registered for free. [Welcome Message]
      PROMO [Service] [code] PROMO [Service]: You have earned XX raffle entry.P2.5/tx
      PROMO [Service] HELP

      PROMO [Service] REG [name],[address],[gender],[age] to register for free

      PROMO [Service] [code] to earn raffle to6800.P2.5/tx

      ERROR and CONDITIONAL MESSAGES
      For incorrect registration PROMO [Service]: Incorrect registration. Text PROMO [Service] REG [name], [address], [gender], [age] to 6800. Registration is FREE.
      For already registered MIN

      PROMO [Service]: Mobile number is already registered.P2.5/tx

      Condition Response
      CS [Service] REG [name],[address],[gender],[age] CS [Service]: You have successfully registered.P2.5/tx [Welcome Message]
      CS [Service][message] CS [Service]: Thank you for your feedback!P2.5/tx
      CS [Service] HELP CS [Service] REG [name],[address],[gender],[age] to register CS [Service] [message] to send feedback to6800.P2.5/tx
      ERROR and CONDITIONAL MESSAGES
      For incorrect registration CS [Service]: Incorrect registration. Text CS [Service] REG [name], [address], [gender], [age] to 6800.P2.5/tx
      For already registered MIN

      CS [Service]: Mobile number is already registered. P2.5/tx

      Sending of message before registration

      CS [Service]: To send feedback to [Service], send CS [Service] REG [name],[address],[gender],[age]to register to 6800. P2.5/tx

      Condition Response
      COUPON [service] ON / IN / YES / GO / OO
      Remarks: Reply Must contain subscription confirmation and content. Example:
      COUPON [service]: Thank you for subscribing. P2.5/tx [Welcome Message] [content]
      Sample Push: COUPON [Service]: [welcome message] [content/coupon details]
      COUPON [Service] HELP
      Remarks: Must contain How to subscribe and unsubscribe
      COUPON [Service] ON to subscribe COUPON [Service] OFF to unsubscribe to6800.P2.5/tx
      STOP ALL
      If with subscription:
      DdMmm XXXX: Your deactivation request is currently being processed. This message is free of charge. Ref:XXXXXXXXXXXX You have unsubscribed from all 6800 services.
      If without subscription:
      DdMmm XXXX: Your deactivation request is currently being processed. This message is free of charge. Ref:XXXXXXXXXXXX You are not subscribed to any 6800 service.
      ERROR and CONDITIONAL MESSAGES
      For already subscribed (double opt-in)

      COUPON [Service]: You are already subscribed. Txt COUPON [Service] OFF unsubscribe for free. Send to 6800.

      For already unsubscribed (double opt-out)

      COUPON [Service]: You are not subscribed. Text COUPON [Service] ON to 6800 to subscribe.P2.5/tx

      Condition Response
      REDEEM [Service] [second keyword] REDEEM [Service]:[Welcome Message] [content/coupon details]
      Sample Push: REDEEM [Service]: [welcome message] [content/coupon details]
      REDEEM [Service] HELP REDEEM [Service] to claim rewards To 6800.P2.5/tx
  • INTEGRATING YOUR APP
    • To connect your app, the developer needs to integrate this URL in his app: http://121.58.235.156/sms/sms_out.php. The developer needs to pass parameters together with this URL. It includes your username, password(not encrypted), msisdn(users mobile number), kw(main keyword e.g daily), service(service name), var1(e.g ‘on’,’off’, ‘help’,’reg’), var2(e.g registration details), binfo(TCSD), dlrurl(balcheck), text(response message) and on=1 for all the subscription based apps.
      • Example:
      • http://121.58.235.156/sms/sms_out.php?username=YourUsername&password
        =YourPassword&msisdn=MobileNumber&kw=Keyword&service=ServiceName&var1=Parameter/Abbreviation
        &var2=Parameter/Abbreviation&text=ReplyMessage&rrn=RRN&svc_id=ServiceID&binfo=BINFO&dlrurl=DLR
        &on=BOOLEAN
      • Sample Code
        • 
          <?php
          $username ='username';  
          $password ='password';
          $msisdn = $_REQUEST['msisdn']; 
          $text = $_REQUEST['text']; 
          $kw = strtolower($_REQUEST['kw']); 
          $service =  strtolower($_REQUEST['service']); 
          $var1=$_REQUEST['var1'];
          $rrn = $_REQUEST['rrn'];
          $var2 =$_REQUEST['var2'];
          $dlurl=urlencode('http://youphoriclabs.com/SMSApps/dailybal/checkbal.php');
          if($var1 == 'on' || $var1 == 'ON')
          {
          $reply= urlencode('$kw $service:Thank you for subscribing. P2.5/tx Welcome to $service!');
          $sendurl='http://121.58.235.156/sms/sms_out.php?username=$username&password=$password&
          msisdn=$msisdn&kw=$kw&service=$service&var1=$var1&var2=$var2&text=$reply&rrn=$rrn&
          svc_id=$servid&binfo=0850&dlrurl=$dlurl&on=1';
          $reqop =& new HTTP_Request('$sendurl');
          $reqop->_allowRedirects = true;
          $reqop->_maxredirects   = 16;
          $resop =& $reqop->sendRequest();		
          		}
          ?>
    • Send scheduled push,the developer needs to integrate this URL in his app: http://121.58.235.156/sms/sms_push.php. The developer needs to pass parameters together with this URL. It includes your username, password(not encrypted), msisdn(users mobile number), kw(main keyword e.g daily), service(service name), var1(e.g ‘on’,’off’, ‘help’,’reg’), var2(e.g registration details), binfo(TCSD), dlrurl(balcheck), and text(response message).
      • Example:
      • http://121.58.235.156/sms/sms_push.php?username=$username&password=$password&msisdn
        =$no&kw=$kw&service=$sname&text=$reply&binfo=0853&dlrurl=$dlrurl

  • TESTING YOUR APP

  • LAUNCHING YOUR APP

    • Once you are done with your test, notify us through support@youphoriclabs.com so we can do a UAT and activate the service.
    • Services that are not activated in 5 days will automatically be deactivated.
    • If you need to resume your development or testing, notify us for reactivation.
© Copyright 2014 Youphoric Labs All Rights Reserved