Send an SMS Using Delphi

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0

The TextMagic API Delphi wrapper can save you a lot of time, as it includes all the necessary API commands and tests. It only takes a few seconds to download it from GitHub and to install it into your own app or software. After installation, you’ll then be able to send text messages.

Get it now on GitHub

Installation Instructions

You can install the TextMagic Delphi wrapper from the Github repository using git. Run the following commands:

git clone git://github.com/textmagic/textmagic-rest-object-pascal.git
cd textmagic-rest-object-pascal

Requirements

The Delphi wrapper for the TextMagic API has the following requirement:

  • Delphi XE2 or higher

Send an SMS using Delphi (an example)

Below is an example of how to send a text message using Delphi:

uses
  TextmagicRestClient;
 
var
  Client : TTMClient;
  MessageResult : TTMMessageResult;
begin
  Client := TTMClient.Create('<USERNAME>', '<APIV2_TOKEN>');
  try
    MessageResult := Client.CreateMessage(
      'Hello from TextMagic Delphi',
      null,
      null,
      null,
      null,
      '99900000',
      null,
      null,
      null,
      null,
      null); 
  except
    on E: TMException do
    begin
      writeln(Error(E));
      Exit();
    end;
  end;
  writeln(IntToStr(MessageResult.Id));
end.

Support

If you need help with the wrapper or if you have any suggestions for improvements, please contact us by emailing support@textmagic.com.