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

Getting a 500 error from the Activity Log List endpoint.

I am getting 500 errors from the following endpoint:

GET https://api.fitbit.com/1/user/-/activities/list.json?afterDate=2018-03-09&sort=asc&limit=10

 All other endpoints are working fine and returning data as expected so I know there is no issue with authentication or anything else. Its strictly this endpoint only. Is it broken? or am I doing something wrong with the parameters?

Best Answer
0 Votes
4 REPLIES 4

@acarter31 make sure you're including the "offset" parameter since it is required as documented on our reference docs. The parameter should be set to 0:

offset=0

Try the request again with all the necessary parameters. Let us know if you're still getting a 500.

Best Answer
0 Votes

Used the following: (includes offset)

https://api.fitbit.com/1/user/-/activities/list.json?afterDate=2018-03-08&sort=desc&offset=0&limit=20

Still getting a 500.

 

Other endpoints work just fine. Smiley Sad

Best Answer
0 Votes

I use the same url and dont get any error messages. If your getting a 500 responce is there anything in the responce body? Usually Fitbit returns error messages

Ionic & Aria, Blaze (retired), Alta (retired), Surge (retired), Charge HR (retired), One (retired), Classic (retired) | Microsoft Surface | Google Pixel 2XL Android FitBit App
Best Answer
0 Votes

Status Code: 500

Response Headers: 

  Date: Fri, 16 Mar 2018 13:04:54 GMT
  Content-Type: text/html;charset=UTF-8
  Transfer-Encoding: chunked
  Connection: keep-alive
  Vary: Origin,Accept-Encoding
  Cache-control: no-cache, private
  Content-Language: en
  Fitbit-Rate-Limit-Limit: 150
  Fitbit-Rate-Limit-Remaining: 150
  Fitbit-Rate-Limit-Reset: 3306
  X-Frame-Options" => SAMEORIGIN
  Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
  Server: cloudflare
  CF-RAY: 3fc76da2eb9117fe-MIA


Response Body:

\r\n
   \r\n
   \r\n
   \r\n
   \r\n
   \r\n
   \r\n
   \r\n
   \r\n
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\n
   <html xmlns="http://www.w3.org/1999/xhtml">\r\n
       <head>\r\n
           <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r\n
           <title>Fitbit.com-Error</title>\r\n
       </head>\r\n
       <body>\r\n
           \r\n
               <!--\r\n
               \r\n
               \r\n
               \r\n
               rid=A29E7A30:5E8D_A92D900A:01BB_5AAB5768_4125CCF5:0A43\r\n
               -->\r\n
               <style>\r\n
                   body.fb-body {background:url(/images/error_pages/bg_body.png) 0 -11px repeat-x #f6f6f6;}\r\n
                   .err {width:730px;margin:50px auto 0;color:#888;font:14px Arial, Helvetica, sans-serif;}\r\n
                   .err:after {overflow:hidden;clear:both;display:block;height:0;content:"";}\r\n
                   .err a {text-decoration:none;}\r\n
                   .err a:hover {text-decoration:underline;}\r\n
                   .err > img {float:left;margin:0 30px 0 0;}\r\n
                   .err.e505 > img {margin-left:60px;}\r\n
                   .err .txt {overflow:hidden;width:330px;}\r\n
                   .err.e505 .txt {width:370px;}\r\n
                   .err .txt a {color:#3d94f5;}\r\n
                   .err h1 {margin:93px 0 5px;color:#888;font:bold 44px/46px Arial, Helvetica, sans-serif;}\r\n
                   .err h1 + p {margin:0 0 7px;line-height:1.5;}\r\n
                   .err p.bold {margin:70px 0 45px;font-size:15px;font-weight:bold;text-align:center;}\r\n
                   .err ul {text-align:center;}\r\n
                   .err li {display:inline-block;width:147px;height:53px;padding:15px 0 0 78px;text-align:left;vertical-align:top;background:url(/images/error_pages/icons_activity.png) no-repeat;}\r\n
                   .err li + li {background-position:0 -68px;}\r\n
                   .err li + li + li {background-position:0 -136px;}\r\n
                   .err li a {color:#58585a;}\r\n
               </style>\r\n
   \r\n
               <div class="err e505">\r\n
                   <img class="pic" src="/images/error_pages/error501.png" alt="Error pic"/>\r\n
                   <div class="txt">\r\n
                       <h1 style="margin-top:160px;">Sorry&hellip;<br/> It's not you.<br/> It's us.</h1>\r\n
                       <p>We're experiencing an internal server problem.<br/> Please try again later or <a href="http://contact.fitbit.com/">contact support</a>.</p>\r\n
                   </div>\r\n
                   <p class="bold">Here are some suggestions to fill your time while we're working on the issue</p>\r\n
                   <ul>\r\n
                       <li><a href="/activities">Take a walk and <br/>get more steps</a></li>\r\n
                       <li><a href="/foods/log">Log that snack <br/>you're munching</a></li>\r\n
                       <li><a href="/">Track your progress <br/>on the dashboard</a></li>\r\n
                   </ul>\r\n
               </div>\r\n
               <script type="text/javascript">\r\n
                   // this line is for case when it loads by iframe\r\n
                   $(document).ready(function() {\r\n
                       $('a').attr("target", "_top");\r\n
                   });\r\n
               </script>\r\n
           \r\n
       </body>\r\n
   </html>
Best Answer
0 Votes