GetKeywords

From CDYNE Wiki
Jump to navigation Jump to search

GetKeywords Request

Parameter Name Data Type Sample Input
LicenseKey: Required to authenticate users invoking this Web Service.

Trial Key. Production Key.

Guid F01d89fd-5155-5455-5585-e84ab8de8591

GetKeywords Response

Parameter Name Data Type Sample Output
ReturnCode: Return code for method call. Should always return NoError for GetKeywords(). String NoError
SMSKeyword: An array of keyword responses shown below.
KeywordResponseInfo

EntryDate: DateTime in UTC of when keyword was added.

Keyword: Keyword.

ShortCode: ShortCode that this keyword is assigned to.


Datetime

String

String


2010-05-11T19:17:28

Keyword27

10101

GetKeywords Code Examples

PHP

1 <?php
2 
3 $client = new SoapClient('http://sms2.cdyne.com/sms.svc?wsdl');
4 $lkey = array('LicenseKey' => 'YOUR LICENSE KEY');
5 $result = $client->GetKeywords($lkey);
6 
7 print_r($result);
8 
9 ?>

PHP with cURL

 1 <?php
 2 
 3 $url = 'http://sms2.cdyne.com/sms.svc/GetKeywords?LicenseKey=YOUR LICENSE KEY';
 4 
 5 $cURL = curl_init(); 
 6 curl_setopt($cURL,CURLOPT_URL,$url);
 7 curl_setopt($cURL,CURLOPT_HTTPGET, true); 
 8 curl_setopt($cURL,CURLOPT_RETURNTRANSFER, true);
 9 curl_setopt($cURL, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Accept: application/json'));
10 
11 $result = curl_exec($cURL); 
12 
13 curl_close($cURL); 
14 
15 print_r($result);
16 
17 ?>