Textlocal Logo

API Documentation

Get Templates

This command will return all templates on your account.

Resource URL

https://api.textlocal.in/get_templates/

Sample Request

<?php
	// Account details
	$apiKey = urlencode('Your apiKey');

	// Prepare data for POST request
	$data = array('apikey' => $apiKey);
 
	// Send the POST request with cURL
	$ch = curl_init('https://api.textlocal.in/get_templates/');
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($ch);
	curl_close($ch);
	
	// Process your response here
	echo $response;
?>
<?php
	// Account details
	$apiKey = urlencode('Your apiKey');

	// Prepare data for POST request
	$data = $apiKey;
 
	// Send the GET request with cURL
	$ch = curl_init('https://api.textlocal.in/get_templates/?' . $data);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($ch);
	curl_close($ch);
	
	// Process your response here
	echo $response;
?>

Sorry, we do not have an example for Class in the language you have chosen.

Parameters

There are no additional parameters for this command
Login Parameters (Additional Information)
apiKey You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address.

Sample Response

{
   "templates":[
      {
         "title":"Template 1",
         "body":"I am a template!"
      },
      {
         "title":"Template 2",
         "body":"I am also a template!"
      }
   ],
   "status":"success"
}
<response>
	<templates>
		<template>
			<title>Template 1</title>
				<body>I am a template!</body>
		</template>
		<template>
			<title>Template 2</title>
				<body>I am also a template!</body>
		</template>
	</templates>
<status>success</status>
</response>