ESP 12E Module ESP8266 | Unable to call Https Api. Connection Failed

89 views Asked by At

I tried everything but every time I am getting "Connection Failed" for client.connect. I have used https://gorest.co.in/public-api/user/123 Used the fingerprints well. Using ESP-12E Module Any pointer will be of great help

Fingerprint I have copied from broswer

#define TEST_HOST "gorest.co.in"
#define TEST_HOST_FINGERPRINT "‎‎f1 5f 90 b4 73 c5 98 1e ec 08 92 69 8c e5 28 f8 7f b3 a8 e8"

// Use WiFiClientSecure class to create TLS connection
  WiFiClientSecure client;
  Serial.print("connecting to ");
  Serial.println(TEST_HOST);

  Serial.printf("Using fingerprint '%s'\n", TEST_HOST_FINGERPRINT);
  //client.setInsecure();
  client.setFingerprint(TEST_HOST_FINGERPRINT);
  
  client.setTimeout(10000);
  if (!client.connect(TEST_HOST, 443)) {
    Serial.println("connection failed");
    return;
  }
0

There are 0 answers