timoschlueter / nightscout-librelink-up

Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout.
MIT License
192 stars 246 forks source link

Nightscout upload failed #57

Closed AidasK closed 2 years ago

AidasK commented 2 years ago

[ image deleted as it had sensitive info ] Nightscout upload fails. Just bought a server from https://www.t1pal.com/ and entered upload url and upload secret and it just fails. Any suggestions? Api secret and host value seems to be fine.

AidasK commented 2 years ago

I guess that t1pal shared hosting does not support api, but they do support uploader url. Does anybody know how to find documentation on how to use uploader api for nightscout. Documentation is tragic there! I would be willing to implement that

AidasK commented 2 years ago

Found something, https://github.com/nightscout/cgm-remote-monitor/wiki/API-v1-Security.

curl "https://ce5d1fb4-upload-read-guest.t1pal.com/api/v1/entries?count=1" -H "Api-Secret: xxx" -H "Content-Type: application/json"

Tried using sha1 instead of api secret and still failed

timoschlueter commented 2 years ago

Have you tried the Swagger-UI provided by your Nightscout instance? The url in your case is https://ce5d1fb4-upload-read-guest.t1pal.com/api-docs/#/

You can provide your API-Secret there and play around with the API. That's usually what I am going with since the documentation on nightspot itself does not really help.

AidasK commented 2 years ago

It looks like I just needed to enter my api secret in sha1 format. It works! Thanks a lot! Swagger docs were a great help too!