Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API only works when fiddler is running

I've written a utility app for loading data into shopify through the rest API.

Having a strange error where the api only works when I'm running Fiddler.

Any idea what's going on? I'm sure it's a configuration issue rather than a code issue.

When Fiddler is running web access is through a proxy on 127.0.01:8888.

I'm not advanced enough on SSL to figure this one out. Do you need a self signed certificate to connect to an SSL API.

I found a few posts suggesting setting ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls but that didn't fix it!

like image 808
msteel9999 Avatar asked Feb 22 '26 16:02

msteel9999


2 Answers

>> Do you need a self-signed certificate to connect to an SSL API.

We faced similar issue with our application. If API has any certificate errors (In our case, we are using self-signed certificate), Browser will not allow you to interact with API.

Solution : Install your root Certificate, so that browser will start honoring your self-signed certificate.

>> Having a strange error where the api only works when I'm running Fiddler. Any idea what's going on? I'm sure it's a configuration issue rather than a code issue.

Whenever you enable HTTPs traffic decryption in fiddler (see below image for enabling this setting in fiddler), below things will happen.

  1. Fiddler will automatically install its root certificate
    "DO_NOT_TRUST_FiddlerRoot" to Browser's CA list.
  2. Fiddler will use your API's self-signed certificate to decrypt HTTP traffic.
  3. Again fiddler will encrypt same HTTP traffic using fiddler signed
    certificate, i.e, for all your API calls will have fiddler signed certificate

As fiddler signed certificates are trusted by user browser (due to step#a), you will not see any certificate errors.

Fiddler

Hope this information helps you!

like image 147
Venkatesh Achanta Avatar answered Feb 25 '26 05:02

Venkatesh Achanta


Turns out I was setting SSL type to SSL3.

i.e. I had this code ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; and shopify doesn't use SSL3 any more.

Turns out it was nothing to do with installing certificates.

like image 24
msteel9999 Avatar answered Feb 25 '26 05:02

msteel9999