GetPostbackSettingsForLicenseKey

From CDYNE Wiki
Revision as of 14:49, 9 October 2017 by imported>Bdriggers (Created page with "== JSON == <PRE> http://messaging.cdyne.com/Messaging.svc/GetPostbackSettingsForLicenseKey?LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591 </PRE> == C# == <code type=csharp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

JSON

http://messaging.cdyne.com/Messaging.svc/GetPostbackSettingsForLicenseKey?LicenseKey=f01d89fd-5155-5455-5585-e84ab8de8591

C#

/*http://messaging.cdyne.com/Messaging.svc?wsdl was added as Service Reference and given the name WSDL*/

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using GetPostbackSettingsForLicenseKey.WSDL;

namespace GetPostbackSettingsForLicenseKey {

   class Program
   {
       static void Main(string[] args)
       {
           MessagingClient client = new MessagingClient("mms2wsHttpBinding");
           Array resp  = client.GetPostbackSettingsForLicenseKey(new Guid("f01d89fd-5155-5455-5585-e84ab8de8591"));
           if (resp.Length > 0)
           {
               foreach (WSDL.PostbackSettingsResponse item in resp)
           
                   Console.WriteLine("Country: " + item.Country + Environment.NewLine +
                       "Phone Number: " + item.PhoneNumber + Environment.NewLine +
                        "Postback Enabled: " + item.PostbackEnabled + Environment.NewLine +
                        "Postback Type: " + item.PostbackType + Environment.NewLine +
                        "Postback URL: " + item.PostbackUrl + Environment.NewLine +
                        "Return Code: " + item.ReturnCode + Environment.NewLine + Environment.NewLine);
                   Console.ReadLine();
           }
       }
   }

}