/InsertAPISubscriber

This is a method that allows you to add subscribers of your company by making a request with the received Token. In the body in json format, “FirstName” (Subscriber Name), “LastName” (Subscriber Surname), “Mobile” (Subscriber Email), “Twitter” (Twitter Address), “Facebook” (Facebook You need to make a request with the “Notes” parameters.

Authorization header should be entered as “token_type” value returned as a result of token request, space character, “Access_token” value.

As a result of the request, a message that the registration has been made is received. When you make a request to the “GetAllSubscribers” method, you can see the record of the subscriber you have added.

InsertAPISubscriber Sample Code (C#)

private static IRestResponse InsertAPISubscriber()
{
  RestClient client = new RestClient(" + apiRootUrl + @");
  RestRequest request = new RestRequest(""api/Subscriber/InsertAPISubscriber"", Method.POST);
  request.AddHeader(""Content-Type"", ""application/json; charset=utf-8"");
  request.AddHeader(""Authorization"", content_type + "" "" + access_token);
  request.AddJsonBody(new {  ""FirstName"": ""string"", ""LastName"": ""string"", ""Mobile"": ""string"", ""Email"": ""string"", ""Password"": ""string"", ""Twitter"": ""string"", ""Facebook"": ""string"", ""Notes"": ""string"" });

                IRestResponse response = client.Execute(request);
                return response;
            }

Was this helpful?

0 / 0