API Integration Document - Kyoto Technologies LLC. (1) (1)
API Integration Document - Kyoto Technologies LLC. (1) (1)
API Integration Document - Kyoto Technologies LLC. (1) (1)
API Integration
Version: 1.3
1
INDEX
2
PUSH API (For Multiple Numbers)
TECHNICAL OVERVIEW
High Level Architecture of Two-Way SMS between Mobile Device
and Application:
user = Use your 8 digit profile id & password to check your balance
4
SEND SMS WITH ADVANCE OPTIONS:
https://sms.kyoto-tech.com/sendurlcomma.aspx?user=xxxxxxxx&pwd=xxxxxx&senderid=SMS
Alert&mobileno=mobileno,mobileno&msgtext=Hello&priority=High&CountryCode=ALL&s
cheduledDate=mm/dd/year hh:min am
5
SEND SMS WITH ADVANCE OPTIONS WITH UNICODE:
https://sms.kyoto-tech.com/sendurlcomma.aspx?user=xxxxxxxx&pwd=xxxxxx&senderid=
SMS
Alert&mobileno=mobileno,mobileno&msgtext=Hello&priority=High&CountryCode=A LL
user = You will get a unique profile id once your account is logged
in. It will be a 8 character numeric id (200XXXXX).
password = Password will be the part of credentials provided to
you. You can change them innumerable times
ABC = This will be the approved Sender ID from the operator. User
can have multiple approved Sender IDs & can use any of them. In
case, the sender ID doesn’t match with the approved ones, SMS will
go from the default ID
mobileno = The UAE mobile no. to which user wants to send SMS.
They can be in any format (+9715XX, 9715XX, 05XX, 5XX). Only
numbers are allowed. System will automatically reject less than 9
digit & nos. not starting with 5.
Hello = The SMS content. 160 English characters counted as 1 SMS.
70 Unicode characters counted as 1 SMS. If SMS length is more than
1 SMS than the SMS counts are in multiple of 153 in case of English
& 67 in case of Unicode.
API #
https://sms.kyoto-
tech.com/sendurlcomma.aspx?user=User&pwd=passw
ord&senderid=ABC&mobileno=mobileno&msgtext=Hello&CountryC
ode=ALL&scheduledDate=mm/dd/year hh:min am
6
Sample Codes
ASP #
sResponse = SMSSend(pno, message )
If right(sResponse,15) = "Send Successful" Then
'write your code here
End If
Function SMSSend (strPh,strMsg)
Dim msgResponse
Dim strRequest
Dim strUrl
msgResponse = ""
strPh=right(strPh,10)
If not IsNumeric(strPh) Or len(strPh) <> 10 Then
msgResponse = "Enter valid Mobile Number."
End If
If strMsg = "" Then
msgResponse = "Enter text message."
End If
strUrl = "https://sms.kyoto-tech.com/sendurlcomma.aspx?"
7
strRequest = strRequest+"user=User"
strRequest = strRequest+"&pwd=pass"
strRequest = strRequest+"&senderid=senderid"
strRequest = strRequest+"&mobileno="+strPh
strRequest = strRequest+"&msgtext="+Server.URLEncode(strMsg)
strRequest = strRequest+"&CountryCode="ALL
strUrl = strUrl+strRequest
8
If Err.Number <> 0 Then
SMSSend = "Problem on sending sms : "& Err.Description
End If
End Function
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.IO;
using System.Net;
public void SMSSend()
{WebClient client = new WebClient();
string baseurl = "https://sms.kyoto-
tech.com/sendurlcomma.aspx?user=User&pwd=xxxx
&senderid=ABC&mobileno=9911111111&msgtext=Hello&CountryC
ode=ALL&scheduledDate=mm/dd/year hh:min am";
Stream data = client.OpenRead(baseurl);
9
StreamReader reader = new StreamReader(data);
string s = reader.ReadToEnd();
data.Close();
reader.Close();}
JAVA #
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Date;
10
HttpURLConnection conn =
(HttpURLConnection)url.openConnection();
conn.setRequestMethod("GET");
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
conn.connect();
BufferedReader rd = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
String line;
StringBuffer buffer = new StringBuffer();
while ((line = rd.readLine()) != null)
{buffer.append(line).append("\n");}
System.out.println(buffer.toString());
rd.close();
conn.disconnect();}catch(Exception e)
{e.printStackTrace();}}}
Note: Required javax.servlet.jar and jdom.jar to execute
( downloadable from internet,add to
classpath ).
11
PHP #
'-- Use URLEncode for parameter msgtext
?php
$url = "https://sms.kyoto-
tech.com/sendurlcomma.aspx?user=User&pwd=xxxx
&senderid=ABC&mobileno=9911111111&msgtext=Hello&CountryC
ode=ALL&scheduledDate=mm/dd/year hh:min am ";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);
echo $curl_scraped_page;?
12
PUSH API (For Single Messages)
13
This API will give you response message as below:
Invalid Mobile No
Invalid Password
Profile Id Blocked
Submission Stops
No More Credits
Enter Mobile Number.
Enter text message
Invalid Profile Id.
Country not activated
API to Send SMS WITH ERROR CODE
https://sms.kyoto-
tech.com/sendurl.aspx?user=<Profile_Id>&pwd=<Pass
word>&senderid=<Sender_Id>&mobileno=966XXXXXXX&msgtext=
Message Text&CountryCode=ALL&ShowError=C
Upon Calling this API you will receive below response codes
000 - Send Successful
001 - Invalid Receiver
003 - Invalid Message
005 - Authorization failed
006 - DND Number
007 - Cannot Extract Country Code
008 - Empty Receiver
009 - Profile Blocked
010 - Invalid Profile ID
011 - Profile ID expired
012 - Sender Id more than 13 Chars
013 - Server Error
14
SEND SMS WITH ADVANCE OPTIONS:
https://sms.kyoto-
tech.com/sendurl.aspx?user=xxxxxxxx&pwd=xxxxxx&senderid=SMS
Alert&mobileno=mobileno&msgtext=Hello&priority=High&CountryCode=ALL&sche
duledDate=mm/dd/year hh:min am
https://sms.kyoto-
tech.com/sendurl.aspx?user=xxxxxxxx&pwd=xxxxxx&senderid=SMS
Alert&mobileno=mobileno&msgtext=Hello&priority=High&CountryCode=ALL
user = You will get a unique profile id once your account is logged
in. It will be a 8 character numeric id (200XXXXX).
password = Password will be the part of credentials provided to
you. You can change them innumerable times
ABC = This will be the approved Sender ID from the operator. User
can have multiple approved Sender IDs & can use any of them. In
case, the sender ID doesn’t match with the approved ones, SMS will
go from the default ID
mobileno = The UAE mobile no. to which user wants to send SMS.
They can be in any format (+9715XX, 9715XX, 05XX, 5XX). Only
numbers are allowed. System will automatically reject less than 9
digit & nos. not starting with 5.
Hello = The SMS content. 160 English characters counted as 1 SMS.
70 Unicode characters counted as 1 SMS. If SMS length is more than
1 SMS than the SMS counts are in multiple of 153 in case of English
& 67 in case of Unicode.
API #
https://sms.kyoto-
tech.com/sendurl.aspx?user=User&pwd=password&se
nderid=ABC&mobileno=mobileno&msgtext=Hello&CountryCode=A
LL&scheduledDate=mm/dd/year hh:min am
16
XML API
17
<msg>Hi this is XML API</msg>
<sender>NASCNT</sender>
<language>ENGLISH</language>
</message>
</messages>
</request>
Response Format:
<response>
<message>
<msg_id> 336886980</msg_id>
<number>919926561799</number>
<str_response>Send Successful</str_response>
</message>
<message>
<msg_id> 336886981</msg_id>
<number>917503368648</number>
<str_response>Send Successful</str_response>
</message>
</response>
18
JSON API:
User will have to pass below parameters
user = <profile id>
pwd = <password>
number = <mobile number with country code>
msg = <Text Message>
sender = <sender id>
language = <Unicode/English>
API to pass parameters -
https://sms.kyoto-tech.com/sendsms_api_json.aspx
In case of Unicode messages language = <Unicode> and msg
parameter has to be passed as hexadecimal.
[{"user":"2XXXXXXX","pwd":"wwwXXX","number":"919926561799",
"msg":"test1","sender":"SMS
Alert","language":"Unicode"},{"user":"2XXXXXXX","pwd":"wwwXXX
","number":"917503368648","msg":"test2","sender":"SMS
Alert","language ":"English"}]
19
PULL API
TECHNICAL OVERVIEW
Fig: High level architecture of Two way SMS between Mobile Device
Application
20
Example pull API
21
After requesting these parameters on that page user can use
that data as per the requirement like insert to database etc.
22