How do i Post Messages using Alerts API?

Documentation for Alerts API

How do i Post Messages using Alerts API?

Postby deepika » Tue Jan 27, 2009 6:41 am

Firstly, as described in previous post, you will need your API Username, Password and Signature to use API Features.
After that you just have to Post your Alert Message data to the version specific Alerts API Handler.
For e.g for Alerts API ver 4.00

Alerts API Handler: http://www.alertsdesktop.com/api_service_400v.php

Essential Authentication Variables to Post to API Handler:

1. METHOD: Different API Methods for different requests. [For Posting Alert Messages, Method is "ALERT_MESSAGE"]
2. VERSION: Exact Version no which you are posting to. [This version is "4.00"]
3. USER: API Username [This is your API Username from your Account]
4. PASS: API Password [This is your API Passwordfrom your Account]
5. SIGN: API Signature [This is your API Signature from your Account]

Data Variables for Posting Alert Messages:

1. cid: Campaign ID to which you want to post message. [Get this from your Current Campaigns page]
2. alert_title: This is Title of Alert Message. [Keep it less than 100 words]
3. alert_message: This is text of Alert Message.
4. alert_link: Hyperlink you may want to embed in your Alert Message. [Optional, usage depends upon the template]
5. alert_expiry: Time after which Alert won't be shown. [You can put like "30 SECOND", "15 MINUTE" , "1 HOUR", "1 DAY" , "1 MONTH" , "1 YEAR" and so on]
6. alert_template: Template ID# you want to use in showing this Alert Message. [Check out Template ID from Alert Templates page]
7. alert_active: Whether Alert is Active or Not. [Active = "Y", Inactive = "N"]

You can post all these variables using either simple HTML Form or using some scripting like PHP / Perl / ASP etc.
You will find example codes for all of these in their respective topics.

Return Variables from API are
1. RESULT= "SUCCESS" if API Call Successful or "ERROR" if some API Call Failed due to some reason.
2. REQUEST= "ALERT_MESSAGE" if API Call Successul or some Specific Failure Message in case of some error.
3. RESPONSE= Details of successful or failed API Call.
^^^^^^^^^^^^^
Deepika
Forum Admin
BusinessAlerts
deepika
Site Admin
 
Posts: 172
Joined: Fri Aug 08, 2008 8:57 am
Location: Chandigarh, India

Return to API Documentation

cron