366 Degrees

366 Web API

Get All Users From 366 Degrees

Description:This will return list of all Users From 366 Degrees.
Method: GetAppUsers
URL: https://api.366.io/DripCampaignApis/api/GetAppUsersListCode
 

Try it out

List of Open Drip Campaigns Information

 
Sender Id Sender Name Sender Email
 

Sample Code

MVC Code

[HttpPost]
public ActionResult GetUsersList(Campaign cam)
{
var result = string.Empty;
try
{
var postReq = (HttpWebRequest)WebRequest.Create(ConfigurationManager.AppSettings["OpenDripCampaigns"].ToString());
postReq.Method = "GET";
postReq.ContentType = "application/x-www-form-urlencoded";
postReq.Headers.Add("Authorization", cam.Authorization.Replace('"', ' ').Trim());
var httpWebReponse = (HttpWebResponse)postReq.GetResponse();
StreamReader responseReader = new StreamReader(httpWebReponse.GetResponseStream());
result = responseReader.ReadToEnd();
httpWebReponse.Close();
responseReader.Close();
}
catch (Exception ex)
{
throw ex;
}
return Json(result, JsonRequestBehavior.AllowGet);
}

JQuery Code

$('#Dripsubmit').click(function ()
{
var form = $("form");
form.validate();
if (form.valid() && !window.isSubmitted)
{
window.isSubmitted = true;
var cam = {
Authorization: $("#Authorization").val()
};
$.ajax({
url: "/OpenDripCampaign/GetUsersList",
type: "POST",
contentType: "application/json;charset=utf-8",
data: JSON.stringify(cam),
dataType: 'json',
timeout: 1200000,
async: true,
success: function (data)
{
var myresult = $.parseJSON(data);
var finalData = JSON.parse(myresult);
$.each(finalData, function (i)
{
$("#tbldetails").append("" + finalData[i].campaign_Id + "" + finalData[i].CampaignName + "" + finalData[i].campaignScheduledDate + " ");
});
},
error: function(err)
{
window.isSubmitted = false;
displaySwalMessageWithButton("Please resolve all errors to proceed further.", "Warning");
console.log(err);
}
});
}
});

Json Output Sample

{
Sender Id:"1",
Sender Name:"Education",
Sender Email:"bbshan69@gmail.com",
}