C# API Call fails (Using the C# example provided by FreshDesk)

<!-
Before creating a topic,
:backhand_index_pointing_right: 1. Describe the challenge that you are facing or the topic that you want to discuss
:light_bulb: 2. Please format code snippets by enclosing it with ``` (triple backticks). For example,

const x = 0; 
x++;

This will improve readability and solution quality. Alternatively, you can also use tools like https://carbon.now.sh/ to beautify code snippets.
:camera_with_flash: 3. Kindly add screenshots or screen grabs that will help us understand your situation better. Feel free to attach images with your post or Dropbox / Google Drive / Box links
:light_bulb: 4. Logs are great if you are dealing with a technical challenge. We ideally expect Console/HAR/ FDK logs if it’s related to app development. You can find more details in our Wiki
Note: Please feel free to remove this block before creating the topic. This is for informative purpose and is technically a comment block :slight_smile:
β†’

I am attempting to use the C# api provided by FreshDesk. The url for the C# code example is here:

I am using the api call of:

/api/v2/tickets a

The error is generated on this line:

using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())

None of the Console.WriteLine in the Catch blocks work, those throw exceptions also. What is wrong with this code sample? Why does it not work if it’s a sample provided by FreshDesk?