Connect with the tools you rely on every day
WTC API uses HTTP requests and REST full components for SMS lookup. The access key is prescribed as part of the API authorization. Requests and responses are formatted In JSON using UTF-8 encoding. To use the API you need to create an account, or you can rent an SMS platform for this purpose.
Read API docs- PHP
- Node JS
- Go
- Java
- Python
- Ruby
- $apikey = ‘test_8zWaPwOaHDPRFmgIldhl’;
$api = new WTC($apikey);
$client = $api->getSmsClient(); //get one of the clients
$balance = $client->getBalance();
- var wtc = require( ‘wtc’ )( ‘‘ );
wtc.getBalance().then(
balance => console.log( “Balance request completed:”, balance ),
error => console.log( “Balance request failed”, error )
);
- //Balance
var balance = hlrClient.GetBalance()
log.Println(balance)
//Prices
var hlrPrices = hlrClient.GetHlrPricesById(9)
log.Println(hlrPrices)
- try (SmsClient smsClient = new SmsClient(“YOUR_API_KEY”)) {
//Log response
smsClient.getJerseyClient().register(new LoggingFilter());
//Sms prices
PricesData smsPrices = smsClient.getSmsPrices(9);
- import pprint
import wtc_restapi as api
from examples.settings import API_KEY
client = api.SMSAPI(config={‘api_key’: API_KEY})
result = client.send(message=api.SMSMessage(body=’test message text’),
recipients=api.Recipient(380967770002))
print(‘Result of SMS sending:\n{}’.format(pprint.pformat(result)))
- pp client.message_create(destination: ‘phone’, originator: ‘SENDER’, body: ‘message text’,
msisdn: ‘380662341945’, reference: ‘MyReference’)
#<WTC::MESSAGE:0x007faad71306f8
@error=0,
@id=”172″,
@price=”0.2300000″,
@currency=”EUR”>