Ozeki NG SMS Gateway logo OZEKI NG SMS Gateway
"The World's most reliable SMS gateway software!"
info@ozekisms.com
Tel.: 00 36 52 532 731
SMS Gateway to send SMS via GSM modem or IP SMS connection Overview SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Quick start SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Download SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Manual SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection How to buy SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection FAQ SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Contact Us SMS Gateway to send SMS via GSM modem or IP SMS connection
OZEKI NG SMS Gateway - Product Guide

Billing methods Contents | Searchsetcredits

Home > Product Manual > Developers Guide > HTTP SMS API > Billing methods > getcredits

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  User Guide
  Developers Guide
  Tutorials
  ASP SMS API
  PHP SMS API
  HTTP SMS API
  Send message
  Receive message
  Billing methods
  getcredits
  setcredits
  addcredits
  Urlencode
  Select operator
  Operate with single message
  Query the addressbook
  Operations with message folders
  Examples
  User handling
  Service Provider Connection Handling
  Reporting API
  Dynamic SMPP parameters
  SQL SMS API
  C Sharp SMS API
  AJAX SMS API
  Delphi SMS API
  Cpp SMS API
  Java SMS API
  VB.NET SMS API
  Python SMS API
  Perl SMS API
  TCL/TK SMS API
  Coldfusion SMS API
  VB 6 SMS API
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
  Cookie policy
 


Automated phone calls?
Ozeki Phone System XE VoIP PBX software is an advanced PBX built for automated voice calls and 2 way SMS messaging. It has outstanding APIs for software developers. It can be used for:

Phone calls from SQL
Phone calls from HTTP
Voice and SMS applications

Callcenter developers
If you are working on telephone solutions, please check out the Ozeki VoIP SIP SDK.
It can be used to create VoIP client and server software.

Contact Us!
If you wish to get further information, do not hesitate to contact us!

E-mail: info@ozekisms.com

If you have a technical question, please submit a support request on-line.

HTTP SMS API - getcredits

(available in version: Ozeki NG SMS Gateway v3.0.1 or newer)

This method can be used to get information about how many messages can a user send. The credit limit of the user is modified if a cost is defined for a route. This way the system can be setup to charge the user for both incoming and outgoing messages. It is also possible to set negative costs for various routes, which is a good option for premium rated services. Negative costs can increase the balance of a user.

Example URL Request

http://127.0.0.1:9501/api?action=getcredits&username=admin&password=abc123&useraccount=admin

Example Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 824

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE smsapi PUBLIC "-//OZEKI//DTD XML 1.0//EN" "http://www.ozekisms.com/DTD/smsapi.xml">
<response>
   <action>getcredits</action>
   <data>
      <account>
         <username>admin</username>
         <balance>123</balance>
      </account>
   </data>
</response>

Description

To get information about the balance of a useraccount use the following format:

http://127.0.0.1:9501/api?action=getcredits&username=UUUUU&password=PPPPP&useraccount=AAAAA

For 127.0.0.1, you should substitute the host name or the IP address of the computer your SMS gateway is installed on. The port number 9501 is the default HTTP port number of the Ozeki NG SMS gateway. It is should not be changed.

The username and the password should be substituted for "UUUUU" and "PPPPP". The username and password identifies the user who wants to get information about the balance. AAAAA should be substituted for the username that specifies the account you want to query information about. For example if the admin user would like to find out what is the balance of a user called "john", he would substitute "admin" for "UUUUU", "abc123" for "PPPPP", which is the username and password of the admin account, then he would substitute "john" for AAAAA. In this case the request would look like this:

http://127.0.0.1:9501/api?action=getcredits&username=admin&password=abc123&useraccount=john

The admin user can query information about all accounts in the system. A user without administrative privileges can query information about his account only. The useraccount parameter is optional. If it is not specified, information will be returned from the account of the logged in user.

Request parameters

Parameter Description Possible values Example M/O*
action Specifies the HTTP API command getcredits action=getcredits M
username Specifies the username. The username and password parameters are used to authenticate the user. Once the user is authenticated messages will be downloaded from his inbox. The value must be urlencoced. string value, maximum length is 16 characters username=admin M
password Specifies the password. The username and password parameters are used to authenticate the user. Once the user is authenticated messages will be downloaded from his inbox. The value must be urlencoced. string value, maximum length is 16 characters password=abc123 M
useraccount Specifies the name of the user account, whose balance is queried. If this parameter is not specified it's value is set to the username parameter. string value, maximum length is 16 characters useraccount=john O

* M = Mandatory parameter, O = Optional parameter

Response parameters
(xml response format)

Parameter Description Possible values Example
account Contains the balance of a user account in an XML structure  
 <account>
         <username>admin</username>
         <balance>123</balance>
      </account>
account.username Identifies the user account. string value, maximum length is 16 characters <username>admin</username>
account.balance Contains the balance of the user account. If this value is less then or equal to zero, the user cannot send SMS messages. integer value <balance>123</balance>




Next page: setcredits
Copyright © 2000 - 2017 Ozeki Informatics Ltd.
All rights reserved

Software PBX for Windows | VoIP SDK   |   Legal information   |   Privacy policy   |   Terms of use
Please, address your inquiries to info@ozekisms.com