Add New User Bulk SMS API Documnetation

Add New User

Add New User.

Please ensure you urlencode all values.

Application API URL:

https://www.smsgateway.center/library/api/reseller/AddClient/

 

Key Value Description
Login Credentials (Required Parameters)
Authenticate your API request using userId-password or apiKey. You should use either one to authenticate your login.
userId Your Registered Username The registered username parameter to be passed. You can use this if apiKey is not being used.
password Your password The password needs to be urlencoded if there are any special characters used in the password field. You can use this if apiKey is not being used.
apiKey Your unique apiKey apiKey needs to be sent as HTTP header when you are not using userId and password credentials. You can avail this from your user control panel and use instead of userId and password HTTP Request parameter. Please do not disclose this to anyone.
Required Parameters
Client_Username Your User's New Username Enter your user's desired username.
Client_Fullname User FullName Your client's Full Name.
Client_Email User's E-mail Your client's email. Password will be sent to this email address.
Client_Mobile User's Mobile Your client's 10 digits mobile number. Password will be sent to this mobile phone number.
Client_Usertype reseller|customer User type as reseller or customer.
Client_Senderid senderId User's desired 6 character's Sender name.
Client_Address yourclientaddress User's full address.
ExpDate 2020-11-12 Set Expiry date for the user. Date format should be YYYY-MM-DD.
format plain|json|xml Value for response format.

System default is plain. If you need responses in JSON or XML then you have to give value as JSON or XML.
Code Description
Success code and Response
900 New user successfully added
Error codes and Response
911 Invalid user credentials.
2528 Invalid Account Type.
2527 Process not completed. Contact support.
2506 Full Name required.
2507 Full Name is too long
2508 Full Name can only contain letters a-z, A-Z.
2509 Full Name is too short.
2510 Email required.
2511 Invalid Email.
2512 Sender name required.
2513 Sender name should be exactly 6 characters
2514 Full address required.
2515 Mobile Number required.
2516 Mobile Number should be not be less than 10 Digits.
2517 Mobile number has to be numeric 0-9.
2518 User Type required.
2519 User Type unknown.
2520 Client's Username required.
2521 Client's Username must be at least 5 characters long, lower case letters and digits.
2522 Client's Username is too short.
2523 Client's Username is too long.
2524 Client's Username already exists.
2525 Expiry Date required.
2526 Invalid Expiry Date.

Save this Page on your Favorite Social Media

Sample Request Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/library/api/reseller/AddClient/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "userId=YourUsername&password=YourPassword&Client_Username=ClientUsername&Client_Fullname=clientfullname&Client_Email=client%40example.com&Client_Mobile=98xxxxxxxx&Client_Usertype=%5Breseller%7Ccustomer%5D&Client_Senderid=6charsendername&Client_Address=yourclientaddress&ExpDate=2018-07-14&format=json",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/library/api/reseller/AddClient/?userId=YourUsername&password=YourPassword&Client_Username=ClientUsername&Client_Fullname=clientfullname&Client_Email=client%40example.com&Client_Mobile=98xxxxxxxx&Client_Usertype=customer&Client_Senderid=6charsendername&Client_Address=yourclientaddress&ExpDate=2018-07-14&format=json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var qs = require("querystring");
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/library/api/reseller/AddClient/",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({ userId: 'YourUsername',
  password: 'YourPassword',
  Client_Username: 'ClientUsername',
  Client_Fullname: 'clientfullname',
  Client_Email: 'client@example.com',
  Client_Mobile: '98xxxxxxxx',
  Client_Usertype: '[reseller|customer]',
  Client_Senderid: '6charsendername',
  Client_Address: 'yourclientaddress',
  format: 'json',
  ExpDate: '2018-07-14' }));
req.end();
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/library/api/reseller/AddClient/?userId=YourUsername&password=YourPassword&Client_Username=ClientUsername&Client_Fullname=clientfullname&Client_Email=client%40example.com&Client_Mobile=98xxxxxxxx&Client_Usertype=customer&Client_Senderid=6charsendername&Client_Address=yourclientaddress&ExpDate=2018-07-14&format=json",
  "headers": {
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "userId=YourUsername&password=YourPassword&Client_Username=ClientUsername&Client_Fullname=clientfullname&Client_Email=client%40example.com&Client_Mobile=98xxxxxxxx&Client_Usertype=%5Breseller%7Ccustomer%5D&Client_Senderid=6charsendername&Client_Address=yourclientaddress&ExpDate=2018-07-14&format=json");
Request request = new Request.Builder()
  .url("https://www.smsgateway.center/library/api/reseller/AddClient/")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://www.smsgateway.center/library/api/reseller/AddClient/?userId=YourUsername&password=YourPassword&Client_Username=ClientUsername&Client_Fullname=clientfullname&Client_Email=client%40example.com&Client_Mobile=98xxxxxxxx&Client_Usertype=customer&Client_Senderid=6charsendername&Client_Address=yourclientaddress&ExpDate=2018-07-14&format=json")
  .get()
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Response

{
    "status": "success",
    "statusCode": "900",
    "transactionId": "fd7a0230-408d-4ad2-b1f2-03b30bc7aaac",
    "reason": "New user successfully added."
}
<?xml version="1.0" encoding="UTF-8"?>
<successResponse>
    <reason>New user successfully added.</reason>
    <status>success</status>
    <statusCode>900</statusCode>
    <transactionId>f3b72129-4e02-489b-a89b-068c93367fcc</transactionId>
</successResponse>
status=success | transactionId=963e2b0c-454a-4637-91b8-2679f0533c92 | statusCode=900 | reason=New user successfully added.