Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

oAuth2 connection gives me a NSURLErrorDomain Code=-1200 error

Hi,

 

We are migrating our Fitbit API to oAuth2 with Implicit Grant Flow (calling directly from iOS app). During API calls, we receive the following errors randomly. If we try to connect again, it will proceed just fine most of the time.

 

Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9802, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x145aab670 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://api.fitbit.com/1/user/-/activities/date/2016-01-28.json, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamPropertySSLClientCertificateState=0, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://api.fitbit.com/1/user/-/activities/date/2016-01-28.json, _kCFStreamErrorCodeKey=-9802}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://api.fitbit.com/1/user/-/activities/date/2016-01-28.json, NSErrorFailingURLStringKey=https://api.fitbit.com/1/user/-/activities/date/2016-01-28.json, _kCFStreamErrorDomainKey=3}

 

Please advise.

 

Thank you!

Wokamon

Best Answer
0 Votes
3 REPLIES 3

That's an unusual error. It's saying that it failed to negotiate a secure HTTPS connection. Are you using any sort of proxy?

Best Answer
0 Votes

Hmm I'm not using any proxy. I'm accessing the API from China. Could GFW be the reason?

 

I'm travelling to UK next week and I'll give it a try again.

Best Answer
0 Votes

@Wokamon wrote:

I'm accessing the API from China. Could GFW be the reason?


Absolutely. Most definitely. Unfortunately. 😕

Best Answer
0 Votes