01-07-2019 19:23
01-07-2019 19:23
Hey there,
we are seeing some unexpected behavior from Fitbit API throwing 502 bad gateway error from Jan 7th, 2019 9PM EST. As there are no changes from our end, wanted to know if there is anything on your end thats causing this issue?
FITBIT getResponseString error status [502]
api.fitbit.com | 502: Bad gateway
Thanks
Answered! Go to the Best Answer.
01-08-2019 08:36
01-08-2019 08:36
Hi @DSGTeam,
We are aware this issue occurred and addressed it. If you're still having problems, please let us know.
Gordon
01-07-2019 19:43
01-07-2019 19:43
Below is the Error that we are seeing on the server end.
01-08-2019 08:36
01-08-2019 08:36
Hi @DSGTeam,
We are aware this issue occurred and addressed it. If you're still having problems, please let us know.
Gordon
08-18-2020 11:04
08-18-2020 11:04
Hi,
We are still seeing this error when making GET or POST requests to the Web API. Any help would be greatly appreciated. Thanks, Chris
Here's the log file
--------------------------
POST:https://api.fitbit.com/1/user/-/activities.json
2020-07-21 10:48:31.831 myFitnessSync - Health To Fitbit[1382:375350] PARAMS:{
activityId = 90013;
date = "2020-07-20";
distance = 6706;
distanceUnit = Steps;
durationMillis = 86400000;
startTime = "00:00:00";
}
2020-07-21 10:48:31.831 myFitnessSync - Health To Fitbit[1382:375350] +[FitbitApiHelper getSessionManager:]
2020-07-21 10:48:31.962 myFitnessSync - Health To Fitbit[1382:374141] POST:FAILURE:<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>api.fitbit.com | 502: Bad gateway</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">body{margin:0;padding:0}</style>
</head>
<body>
<div id="cf-wrapper">
<div id="cf-error-details" class="cf-error-details-wrapper">
<div class="cf-wrapper cf-error-overview">
<h1>
<span class="cf-error-type">Error</span>
<span class="cf-error-code">502</span>
<small class="heading-ray-id">Ray ID: 5b65614b7f7ce748 • 2020-07-21 13:48:31 UTC</small>
</h1>
<h2 class="cf-subheadline">Bad gateway</h2>
</div><!-- /.error-overview -->
<div class="cf-section cf-highlight cf-status-display">
<div class="cf-wrapper">
<div class="cf-columns cols-3">
<div id="cf-browser-status" class="cf-column cf-status-item cf-browser-status ">
<div class="cf-icon-error-container">
<i class="cf-icon cf-icon-browser"></i>
<i class="cf-icon-status cf-icon-ok"></i>
</div>
<span class="cf-status-desc">You</span>
<h3 class="cf-status-name">Browser</h3>
<span class="cf-status-label">Working</span>
</div>
<div id="cf-cloudflare-status" class="cf-column cf-status-item cf-cloudflare-status ">
<div class="cf-icon-error-container">
<i class="cf-icon cf-icon-cloud"></i>
<i class="cf-icon-status cf-icon-ok"></i>
</div>
<span class="cf-status-desc">Newark</span>
<h3 class="cf-status-name">Cloudflare</h3>
<span class="cf-status-label">Working</span>
</div>
<div id="cf-host-status" class="cf-column cf-status-item cf-host-status cf-error-source">
<div class="cf-icon-error-container">
<i class="cf-icon cf-icon-server"></i>
<i class="cf-icon-status cf-icon-error"></i>
</div>
<span class="cf-status-desc">api.fitbit.com</span>
<h3 class="cf-status-name">Host</h3>
<span class="cf-status-label">Error</span>
</div>
</div>
</div>
</div><!-- /.status-display -->
<div class="cf-section cf-wrapper">
<div class="cf-columns two">
<div class="cf-column">
<h2>What happened?</h2>
<p>The web server reported a bad gateway error.</p>
</div>
<div class="cf-column">
<h2>What can I do?</h2>
<p>Please try again in a few minutes.</p>
</div>
</div>
</div><!-- /.section -->
<div class="cf-error-footer cf-wrapper">
<p>
<span class="cf-footer-item">Cloudflare Ray ID: <strong>5b65614b7f7ce748</strong></span>
<span class="cf-footer-separator">•</span>
<span class="cf-footer-item"><span>Your IP</span>: 156.34.48.71</span>
<span class="cf-footer-separator">•</span>
<span class="cf-footer-item"><span>Performance & security by</span> <a href="https://www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">Cloudflare</a></span>
</p>
</div><!-- /.error-footer -->
</div><!-- /#cf-error-details -->
</div><!-- /#cf-wrapper -->
</body>
</html>
:https://api.fitbit.com/1/user/-/activities.json
{
"Accept-Language" = "en;q=1, en-US;q=0.9";
Authorization = "Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIyMjg1MzgiLCJzdWIiOiI2UjlIRlMiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZXMiOiJ3cHJvIHdhY3Qgd3NldCIsImV4cCI6MTYyNjg3NTE5NCwiaWF0IjoxNTk1MzM5MTk0fQ.jYKsKGU8QoYzZxAt8GR5csojVfzOWrNrJoar2k6fFIE";
"Content-Type" = "application/x-www-form-urlencoded";
"User-Agent" = "myFitnessSync - Health To Fitbit/1.7.7 (iPhone; iOS 13.5.1; Scale/2.00)";
} COMPLETE ERROR: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad gateway (502)" UserInfo={NSLocalizedDescription=Request failed: bad gateway (502), NSErrorFailingURLKey=https://api.fitbit.com/1/user/-/activities.json, com.alamofire.serialization.response.error.data={length = 4077, bytes = 0x3c21444f 43545950 45206874 6d6c3e0a ... 2f68746d 6c3e0a0a }, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x281ac00c0> { URL: https://api.fitbit.com/1/user/-/activities.json } { Status Code: 502, Headers {
"Cache-Control" = (
"private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
);
"Content-Type" = (
"text/html; charset=UTF-8"
);
Date = (
"Tue, 21 Jul 2020 13:48:31 GMT"
);
Expires = (
"Thu, 01 Jan 1970 00:00:01 GMT"
);
Server = (
cloudflare
);
"Set-Cookie" = (
"cf_use_ob=0; path=/; expires=Tue, 21-Jul-20 13:49:01 GMT"
);
"cf-ray" = (
"5b65614b7f7ce748-EWR"
);
"cf-request-id" = (
04133b23270000e748bc1b0200000001
);
"x-frame-options" = (
SAMEORIGIN
);
} }}
2020-07-21 10:48:31.962 myFitnessSync - Health To Fitbit[1382:374141] postStepsWithCredential: Error Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad gateway (502)" UserInfo={NSLocalizedDescription=Request failed: bad gateway (502), NSErrorFailingURLKey=https://api.fitbit.com/1/user/-/activities.json, com.alamofire.serialization.response.error.data={length = 4077, bytes = 0x3c21444f 43545950 45206874 6d6c3e0a ... 2f68746d 6c3e0a0a }, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x281ac00c0> { URL: https://api.fitbit.com/1/user/-/activities.json } { Status Code: 502, Headers {
"Cache-Control" = (
"private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
);
"Content-Type" = (
"text/html; charset=UTF-8"
);
Date = (
"Tue, 21 Jul 2020 13:48:31 GMT"
);
Expires = (
"Thu, 01 Jan 1970 00:00:01 GMT"
);
Server = (
cloudflare
);
"Set-Cookie" = (
"cf_use_ob=0; path=/; expires=Tue, 21-Jul-20 13:49:01 GMT"
);
"cf-ray" = (
"5b65614b7f7ce748-EWR"
);
"cf-request-id" = (
04133b23270000e748bc1b0200000001
);
"x-frame-options" = (
SAMEORIGIN
);
} }} Activity Log Id (null)