We get reports from several users of our app that they can't upload activity data to Fitbit anymore (since 1 or 2 days). We checked it and we see that they get the following error response when uploading an activity:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
We tested this with two Fitbit test accounts: with Postman we uploaded the same activity data sucessfully to one test account, but on the other account it fails with the internal error. We only changed the authorization token and the user id. We reauthorized the test user, but that didn't solve the problem, the activity uploads keeps returning the 500 response.
I can give you detailed information to reproduce this, but preferably not here in the public forum.
Answered! Go to the Best Answer.
@JohnFitbit just confirmed to us (in a support ticket) that the POST of activity data without the 'manualCalories' field is working again. We tested it and we can confirm that the optional manualCalories field is really optional again, as described in the API specification.
I'm not sure about POST requests of activity data with the intensity level activity id instead of a directory activity id, but we changed all activity POST requests to directory activity ids and that's working fine.
This is happening to a lot of users as well. Here's a example request:
https://api.fitbit.com/1/user/-/activities.json
{ activityId = 90013; date = "this forum won't let supply a date"; distance = 11487; distanceUnit = Steps; durationMillis = 86400000; startTime = "00:00:00"; }
Does this happen if a user already has steps recorded for that day from another source?
Thanks,
Chris
Best AnswerWith a test account I now saw one activity uploaded by our app appear in Fitbit, although this activity was uploaded with the same error response (500), so it seems it was processed in some way, but it didn't appear until another activity was manually added to Fitbit. An activity uploaded to the same test account earlier today still didn't appear (that upload also got the 500 response). Something seems to be really wrong. This started just two days ago, no changes in our app.
Fitbit (John) confirmed that Fitbit is aware of the issue and working on it. It now also affects the GET activities requests (not only the POST).
The Fitbit status page shows the current status: https://status.fitbit.com/
Best AnswerAs far as we can see, the GET/POST activities 500 issue has been resolved now. On our test devices it is working again, and no new reports issues by users of our app.
Best AnswerWith POST activity request, there is still a 500 internal error when you do the following:
It seems some developers did some changes with the Fitbit API server code, without reading the API specifications 😞
We reported it to Fitbit, so hopefully it will be fixed, or the API specification will be updated.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Hi @Hielko
Thank you for reporting the 2 POST activity problems. Let me try to reproduce the issues and submit tickets to our engineering team. For the second problem, would you please provide me with the activity id that works and the one that fails? I'm not exactly certain what you mean in that situation.
Thanks!
Best AnswerHi Gordon, thank you for your response. I provided detailed information in the support case Fitbit Case #00109013, which has been ongoing for some time. Your colleague, John, was my contact last week. I believe you can access the case to review my latest messages. Let me know if I have to sent any information again. Thanks for your support!
Hielko
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Great! I'll take a look at case 00109013. More than likely, engineering already knows about your problem.
Best Answer@Gordon-C @Hielko Do you have the link to the Fitbit case 00109013? Our users a really upset at the moment. Especially users who have been using our app for years. We've had 10x the number refunds than we normal get. The only things that seems to work for us is if our users keep trying to make the requests. It's almost like there are a couple servers with the old code that works.
Hi, yeah, can you please treat this issue as a high priority one? The inability to post activities for several days is a pretty huge deal I would say? Surely this will break many apps.
Also if it is true that `manualCalories` is now required and that is the source of the issue, can the API response include that info?
Thanks.
This is ridiculous! I have not been able to sync the myfitness app since September 1. That is 11 days ago and I don’t think it worked on August 31 either. I use this to sync my Apple fitness to my silver sneakers account. I have been getting the same error that it cannot sync and is either from my internet…which is isn’t…to Fitbit servers and to send info to,app. I have three times. They are frustrated and said it has to do with Fitbit servers. Please fix this
Best Answer@JohnFitbit just confirmed to us (in a support ticket) that the POST of activity data without the 'manualCalories' field is working again. We tested it and we can confirm that the optional manualCalories field is really optional again, as described in the API specification.
I'm not sure about POST requests of activity data with the intensity level activity id instead of a directory activity id, but we changed all activity POST requests to directory activity ids and that's working fine.
Can you explain the intensity level activity IDs versus directory activity IDs a little more?
I'm still getting 500 response errors since this has started. I've always been sending this structure, using the fitbit python library.
activity = {
'activityId': 90009, # The ID of the activity
'durationMillis': 3600000, # The duration of the activity in milliseconds
'startTime': '7:00', # The start time of the activity in format 'HH:mm'
'date': date_str, # The date of the activity in format 'yyyy-MM-dd'
'distance': 7 # The distance of the activity in miles
}
I even tried adding the manualCalories entry as suggested but that was also returning 500 error.
Best Answer