03-18-2019 12:52 - edited 03-18-2019 14:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-18-2019 12:52 - edited 03-18-2019 14:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
I am using a fit bit studio for collecting accelerometer, Heart rate values and then wanted to send those values to my server for inserting into my database.
This is my URL: https://qav2.cs.odu.edu/fitbit/test.php
first priority if possible: How can I send data from index.js in app folder?
I tried sending data from index.js which is there in the companion folder.
Code in companion index.js:
function sendData() {
var data = {username: 'example'};
console.log("welcome fetech....");
fetch('https://qav2.cs.odu.edu/fitbit/test.php', {
method: 'POST', // or 'PUT'
// body: JSON.stringify(data), // data can be `string` or {object}!
}).then(res => res.json())
.then(response => console.log('Success:', JSON.stringify(response)))
.catch(error => console.error('Error:', error));
}
setInterval(sendData, 250);
I got an error while sending:
[3:26:22 PM]Failed to fetch - Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( "<cert(0x1140a8200) s: qav2.cs.odu.edu i: InCommon RSA Server CA>", "<cert(0x114169600) s: AddTrust External CA Root i: AddTrust External CA Root>", "<cert(0x114103200) s: USERTrust RSA Certification Authority i: AddTrust External CA Root>", "<cert(0x1142dd000) s: InCommon RSA Server CA i: USERTrust RSA Certification Authority>" ), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://qav2.cs.odu.edu/fitbit/test.php, NSErrorFailingURLStringKey=https://qav2.cs.odu.edu/fitbit/test.php, NSUnderlyingError=0x2833e5e90 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x280f7f9f0>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=( "<cert(0x1140a8200) s: qav2.cs.odu.edu i: InCommon RSA Server CA>", "<cert(0x114169600) s: AddTrust External CA Root i: AddTrust External CA Root>", "<cert(0x114103200) s: USERTrust RSA Certification Authority i: AddTrust External CA Root>", "<cert(0x1142dd000) s: InCommon RSA Server CA i: USERTrust RSA Certification Authority>" )}}, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <366B904A-6643-462C-8E27-1F607C807A8B>.<59>" ), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <366B904A-6643-462C-8E27-1F607C807A8B>.<59>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x280f7f9f0>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}
Please help!
Answered! Go to the Best Answer.
Accepted Solutions
03-24-2019 20:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-24-2019 20:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Ever Firefox won't go to that URL without throwing up security errors. I'd say the problem is with your server SSL setup; it's not (yet) a Fitbit-specific issue.
Gondwana Software
03-18-2019 15:08 - edited 03-18-2019 15:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-18-2019 15:08 - edited 03-18-2019 15:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @Handsonlab,
I moved your question to the Web API forum. It was originally posted in the Versa forum, which is for general support. Let me know if you think it should be in the SDK forum, and I can move it there.

03-18-2019 16:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



03-18-2019 16:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
This question sounds to be with the Device DSK, not the Web APIs. Hopefully someone here can help you out.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
03-18-2019 18:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-24-2019 20:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-24-2019 20:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
can someone please help me out with the above question?

03-24-2019 20:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-24-2019 20:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Ever Firefox won't go to that URL without throwing up security errors. I'd say the problem is with your server SSL setup; it's not (yet) a Fitbit-specific issue.
Gondwana Software
