Send an SMS Using Delphi
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 [email protected].