# HTTPS example error

**URL:** <https://community.particle.io/t/https-example-error/55543>\
**Category:** Libraries\
**Created:** [April 7, 2020, 7:24pm UTC](https://community.particle.io/t/https-example-error/55543 "2020-04-07T19:24:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michele](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Michele](https://community.particle.io/u/Michele)\
**Post date:** [April 7, 2020, 7:24pm UTC](https://community.particle.io/t/https-example-error/55543/1 "2020-04-07T19:24:12Z")

</div>

My weather station code calls anAPI at [www.myweather2.com](http://www.myweather2.com). It worked great using HttpClient until recently when I started getting 303 errors. The URL it says to use is the same but it begins with HTTPS. I read the thread on the HTTPS library, understood very little of it and decided to try the example below first.

`https://github.com/glowfishAPI/httpsclient-particle/blob/master/firmware/examples/timeapi-test.cpp`

This compiled and loaded onto my Photon OK but the output I got is:

```auto
Using 2048 bit RSA private key
Keys Loaded
New Session key!:
free memory: 34464
matrixSslNewClientSession:1
free memory 3: 34464
FAIL: No HTTP

```

Can someone please help? I have no idea what this means or what to do about it.

---

<div class="post-metadata">

**Author:** ![Michele](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Michele](https://community.particle.io/u/Michele)\
**Post date:** [April 9, 2020, 4:57pm UTC](https://community.particle.io/t/https-example-error/55543/2 "2020-04-09T16:57:01Z")

</div>

Well this is odd. There was apparently a Github issue about this code around the included URL being 404. So I followed the suggestion there and changed it to [www.worldclockapi.com](http://www.worldclockapi.com). Now when I run this program I get:

```auto
Using 2048 bit RSA private key
Keys Loaded
New Session key!:
free memory: 34464

```

[SOS-10 (assertion failure), followed by a reboot]

Trying it again, I get

```auto
Using 2048 bit RSA private key
Keys Loaded
New Session key!:
free memory: 34464
matrixSslNewClientSession:1
free memory 3: 34464
FAIL: No HTTP Response

```

followed by SOS-10 again.

My Photon is running f/w 1.4.0-rc.1. I also found another thread here with someone asking for a simple HTTPS example. He also received no replies.

UPDATE

Added a few printlns to the code and tried to flash/ This time it failed to flash at all because it couldn’t do OTA flashing, use particle update. Well that didn’t work either. But a reflash Tinker from my phone did work and then the above example code also flashed. Now I get this:

```auto
Using 2048 bit RSA private key
Keys Loaded
New Session key!:
Connected to host
free memory: 31576
matrixSslNewClientSession:1
free memory 3: 31576
Bytes sent Successfully?!: 98
matrixSslSentData: 0
Sent Successfully?!, everything good
matrixSslGetReadbuf: 6000
HttpClient> Done before full len
0
HttpClient> Done before full len
3894
Received: 3894
certCb invoked: 45
WARNING: Certificate date window validation not implemented
SUCCESS: Validated!
matrixSslReceivedData: Tx: 3894 Len: 0 rc: 1

```

So now all of a sudden it’s sort of working, I guess. But it still falls into SOS-10 right after that. Why?

Further Update

Apparently others are getting the same SOS-10 problem with this code. I regretfully conclude that the HTTPS library is unusable at this point. I guess I’ll have to find a weather API that does not use HTTPS.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [June 8, 2020, 4:57pm UTC](https://community.particle.io/t/https-example-error/55543/3 "2020-06-08T16:57:07Z")

</div>

Closed on June 8, 2020, 4:57pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
