twosuperior/textmarketer

Unofficial Package for Official Text Marketer Rest Client

Installs: 16 446

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 2

pkg:composer/twosuperior/textmarketer

1.0.0 2026-01-21 12:35 UTC

This package is auto-updated.

Last update: 2026-01-21 15:48:38 UTC


README

TextMarketer's PHP SDK for easy integration between your app and our SMS messaging REST API.

Example

// REPLACE with your Text Marketer API username and password
$client = new \TextMarketer\Client('myuser', 'mypass', 'production');

try {
	
	$credits = $client->getCredits();
	echo "I have $credits credits.<br />\n";

	if ($credits > 0)
		$result = $client->sendSMS('Hello SMS World!', '447777777777', 'My Name');
	
	echo "Used {$result['credits_used']} credits, message ID {$result['message_id']}, scheduled ID {$result['scheduled_id']}<br /><br />\n"; 
	
} catch (Exception $ex) {
	// handle a possible error
	echo "An error occurred: {$ex->getCode()}, {$ex->getMessage()}";
}