Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to call chargify webhooks API using .net

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 716
    Comment on it

    1.Give the http url of chargify , here the url is domainname.chargify.com then add /webhooks to this url ,/webhooks give the list of all webhooks and format is either json format or xml format

    var responseText=string.Empty;
    var httpWebRequest = (HttpWebRequest)WebRequest.Create(https://domainname.chargify.com/webhooks.format);
    httpWebRequest.ContentType = "application/x-www-form-urlencoded";
    2.Pass the apikey and apipassword of chargify
    httpWebRequest.Headers.Add("username:" + apikey);
    httpWebRequest.Headers.Add("password:" + apipassword);
    

    3.pass basic authentication credentials

    httpWebRequest.Credentials = new NetworkCredential(apiKey, apiPassword);
    

    4.Assign the httpWebRequest method ,here the method is GET

    httpWebRequest.Method = "GET";
    

    5.Get response text , the response text is either in json format or xml format according to our url

    var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
    
    using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
    {
       responseText = streamReader.ReadToEnd();
    }

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: