SMS Templates - Add Service Provider Credentials
Allows you to add a the SMS Service Provider credentials to an existing loyalty account.
The data to be submitted to the API is composed of the following fields:
Fields common to all campaign types:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.5 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_api_key |
|
1959caadac9b13dcb3 |
|
Required |
|
|
|
type |
|
manage_sms_templates |
|
Required |
|
|
|
action |
|
new |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
sms_service_id |
|
1 |
|
Required |
|
|
|
twilio_account_sid |
|
AC8dd572402b9795200ddd2185ea3ec368 |
|
Required |
|
|
|
auth_token |
|
09f36e9a8e69e3488d761a6a4d2d9664 |
|
Required |
|
|
|
phone_numbre |
|
+18646574216 |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
Notes:
- Parameters to add in this API call may vary from each Service Provider. In this example the parameter "twilio_account_sid" is unique to Twilio.
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['API'] = '1.5';
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '1959caadac9b13dcb3';
- $data['account_id'] = 'greatwidgets';
- $data['type'] = 'manage_sms_templates';
- $data['action'] = 'new';
- $data['sms_service_id'] = '1';
- $data['twilio_account_sid'] = 'AC8dd572402b9795200ddd2185ea3ec368';
- $data['auth_token'] = '09f36e9a8e69e3488d761a6a4d2d9664';
- $data['phone_number'] = '+18646574216';
Success XML Response:
- <response status="success">
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|