09-25-2016 08:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-25-2016 08:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am consistently getting a 504 error code for the following url:
/1/user/-/activities/activityCalories/date/today/max.json
I can successfully make requests to other activity endpoints.
Here is the response body:
<!DOCTYPE html>\n<!--[if lt IE 7]> <html class=\"no-js ie6 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if IE 7]> <html class=\"no-js ie7 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if IE 8]> <html class=\"no-js ie8 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en-US\"> <!--<![endif]-->\n<head>\n\n\n<meta http-equiv=\"set-cookie\" content=\"cf_use_ob=0; expires=Sun, 25-Sep-16 15:11:35 GMT; path=/\">\n\n\n<title>api.fitbit.com | 504: Gateway time-out</title>\n<meta charset=\"UTF-8\" />\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\" />\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,maximum-scale=1\" />\n<link rel=\"stylesheet\" id=\"cf_styles-css\" href=\"/cdn-cgi/styles/cf.errors.css\" type=\"text/css\" media=\"screen,projection\" />\n<!--[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]-->\n<style type=\"text/css\">body{margin:0;padding:0}</style>\n<!--[if lte IE 9]><script type=\"text/javascript\" src=\"/cdn-cgi/scripts/jquery.min.js\"></script><![endif]-->\n<!--[if gte IE 10]><!--><script type=\"text/javascript\" src=\"/cdn-cgi/scripts/zepto.min.js\"></script><!--<![endif]-->\n<script type=\"text/javascript\" src=\"/cdn-cgi/scripts/cf.common.js\"></script>\n\n</head>\n<body>\n<div id=\"cf-wrapper\">\n\n \n\n <div id=\"cf-error-details\" class=\"cf-error-details-wrapper\">\n <div class=\"cf-wrapper cf-error-overview\">\n <h1>\n <span class=\"cf-error-type\" data-translate=\"error\">Error</span>\n <span class=\"cf-error-code\">504</span>\n <small class=\"heading-ray-id\">Ray ID: 2e7f67ddaa690850 • 2016-09-25 15:11:05 UTC</small>\n </h1>\n <h2 class=\"cf-subheadline\" data-translate=\"error_desc\">Gateway time-out</h2>\n </div><!-- /.error-overview -->\n\n <div class=\"cf-section cf-highlight cf-status-display\">\n <div class=\"cf-wrapper\">\n <div class=\"cf-columns cols-3\">\n \n<div id=\"cf-browser-status\" class=\"cf-column cf-status-item cf-browser-status \">\n <div class=\"cf-icon-error-container\">\n <i class=\"cf-icon cf-icon-browser\"></i>\n <i class=\"cf-icon-status cf-icon-ok\"></i>\n </div>\n <span class=\"cf-status-desc\" data-translate=\"browser_desc\">You</span>\n <h3 class=\"cf-status-name\" data-translate=\"browser_label\">Browser</h3>\n <span class=\"cf-status-label\" data-translate=\"browser_status_label\">Working</span>\n</div>\n\n<div id=\"cf-cloudflare-status\" class=\"cf-column cf-status-item cf-cloudflare-status \">\n <div class=\"cf-icon-error-container\">\n <i class=\"cf-icon cf-icon-cloud\"></i>\n <i class=\"cf-icon-status cf-icon-ok\"></i>\n </div>\n <span class=\"cf-status-desc\" data-translate=\"cloud_desc\">Ashburn</span>\n <h3 class=\"cf-status-name\" data-translate=\"cloud_label\">CloudFlare</h3>\n <span class=\"cf-status-label\" data-translate=\"cloud_status_label\">Working</span>\n</div>\n\n<div id=\"cf-host-status\" class=\"cf-column cf-status-item cf-host-status cf-error-source\">\n <div class=\"cf-icon-error-container\">\n <i class=\"cf-icon cf-icon-server\"></i>\n <i class=\"cf-icon-status cf-icon-error\"></i>\n </div>\n <span class=\"cf-status-desc\" data-translate=\"server_desc\">api.fitbit.com</span>\n <h3 class=\"cf-status-name\" data-translate=\"server_label\">Host</h3>\n <span class=\"cf-status-label\" data-translate=\"server_status_label\">Error</span>\n</div>\n\n </div>\n </div>\n </div><!-- /.status-display -->\n\n <div class=\"cf-section cf-wrapper\">\n <div class=\"cf-columns two\">\n <div class=\"cf-column\">\n <h2 data-translate=\"what_happened\">What happened?</h2>\n <p>The web server reported a gateway time-out error.</p>\n </div>\n\n <div class=\"cf-column\">\n <h2 data-translate=\"what_can_i_do\">What can I do?</h2>\n <p data-translate=\"try_again_in_a_few\">Please try again in a few minutes.</p>\n </div>\n </div>\n </div><!-- /.section -->\n\n <div class=\"cf-error-footer cf-wrapper\">\n <p>\n <span class=\"cf-footer-item\">CloudFlare Ray ID: <strong>2e7f67ddaa690850</strong></span>\n <span class=\"cf-footer-separator\">•</span>\n <span class=\"cf-footer-item\"><span data-translate=\"your_ip\">Your IP</span>: 173.73.162.66</span>\n <span class=\"cf-footer-separator\">•</span>\n <span class=\"cf-footer-item\"><span data-translate=\"performance_security_by\">Performance & security by</span> <a data-orig-proto=\"https\" data-orig-ref=\"www.cloudflare.com/5xx-error-landing?utm_source=error_footer\" id=\"brand_link\" target=\"_blank\">CloudFlare</a></span>\n \n </p>\n</div><!-- /.error-footer -->\n\n\n </div><!-- /#cf-error-details -->\n</div><!-- /#cf-wrapper -->\n
It looks like the standard CloudFlare error message. It tells me that I should try again in a few minutes, but that does not solve the problem; I can consistently reproduce the error.
Any idea what I can do to work around this? I checked the activity docs, and it looks like that endpoint is still valid.

10-03-2016 17:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-03-2016 17:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
'max' has been deprecated. Try using a period of 1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y instead.

10-14-2016 03:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-14-2016 03:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Also seeing this with duration of `1y`.

10-14-2016 10:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-14-2016 10:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@ryanleary This appears to be a bug specific to that endpoint with '1y' duration. All the other durations should work.

09-11-2017 01:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-11-2017 01:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I can't find on the documentation any reference on max being deprecated. It works fine on other endpoints.

