Beta

Overview

The Guidant Financial API uses basic access authentication to authenticate users.

In order to authenticate using the cUrl tool, specify your username and password with the -u flag.

curl -X POST https://webapi.guidantfinancial.com/json/endpoint-here -u 'username:password' -d '{"json":"here"}' -H "Content-Type: application/json"

To authenticate using PHP, base64_encode your username and password string ("username:password") and append it to the "Basic" string and use that as your "Authorization" header.

  ...
  $curl_instance = curl_init();
                            
  $hash = base64_encode("username:password");
  curl_setopt($curl_instance, CURLOPT_HTTPHEADER, array("Authorization: Basic " . $hash));
  
  curl_setopt($curl_instance, CURLOPT_RETURNTRANSFER, 1 );
  $result = curl_exec($curl_instance);
  ...
  

To authenticate using C#, Convert.ToBase64String your username and password string ("username:password") and append it to the "Basic" string and use that as your HttpRequestHeader.Authorization header.

  ...
  using (var webClient = new WebClient())
  {
      var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes("username:password"));
      webClient.Headers[HttpRequestHeader.Authorization] = "Basic " + credentials;
      webClient.Headers[HttpRequestHeader.ContentType] = "application/json";
      var data = new JavaScriptSerializer().Serialize(
          new Dictionary<string, string>
          {
              ["cid"] = "your_cid_here",
              ["first_name"] = "john",
              ["last_name"] = "adams",
              ["phone"] = "555-555-5555",
              ["email"] = "john@somedomainname.com"
          });
      var result = webClient.UploadString("https://webapi.guidantfinancial.com/json/leads", data);
  }
  ...