Hello -
We're seeing a lot of "the remote server returned an error: (500) Internal Server Error" errors when making web API calls today to retrieve activity (calling /activities/steps, for example, after we receive a notification the user has new data). I'm not sure what I can do about it from our side besides requeue to pull the Fitbit user's data later ... does Fitbit see anything on their side?
Kind regards.
Jay
Answered! Go to the Best Answer.
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 everyone,
We've resolved the 500 error when using the activity collection, and I have confirmed it with my own app. Let me know if you are still receiving the error.
Some additional information. We use Subscriptions. After a user approves us to retrieve Activity, we subscribe to activities notifications using:
/1/user/-/activities/apiSubscriptions/[subscription-id].json
That appears to be working -- at least, no errors are returned. However, when we try to query a subscription using:
/1/user/-/activities/apiSubscriptions.json
... it always returns error "(500) Internal Server Error." This code hasn't changed in 7 years, and I don't see anything in the doc that suggests it shouldn't work anymore.
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.
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.
@JayMC ... How many subscribers do you have verified with your client ID? Are you specifying the "X-Fitbit-Subscriber-Id" when calling the GET /1/user/-/activities/apiSubscriptions.json request? What happens when you call GET /1/user/-/apiSubscriptions.json?
(at)JayMC
Sorry about that ... I was still logged in my personal account when I added more information. My company account with access to our Web API application is jeaglemc.
How many subscribers do you have verified with your client ID?
We have about 19,800 Fitbit users active on our platform. There are more subscriptions attached to our client ID than active Fitbit users on our platform, though, due to us not being able to delete subscriptions and authorizations without a valid refresh token (I think that's still a enhancement request) -- for those, we ignore the notifications we receive.
Are you specifying the "X-Fitbit-Subscriber-Id" when calling the GET /1/user/-/activities/apiSubscriptions.json request?
We aren't. We've only ever been relying on the default subscriber ID all our API calls (we have only 1 subscriber ID). I did just try the GET request with the "X-Fitbit-Subscriber-Id" in the header (and our subscriber ID as the value) and still received a "(500) Internal Server Error", though.
What happens when you call GET /1/user/-/apiSubscriptions.json?
Does this include what you're looking for (I just went through the OAuth and subscription process for my Fitbit ID and looked at the responses I received):
1. I request authorization ... that worked fine.
2. I request access ... that worked fine.
3. I subscribe to activity notifications ... that worked fine.
All of that happened in about 10 seconds. I then call GET /1/user/-/apiSubscriptions.json for the user I just OAuth'd and created a subscription for (to the subscription I just created in step 3 above):
1. I create the Bearer token "Authorization" header.
2. I connect and call GET https://api.fitbit.com/1/user/-/apiSubscriptions.json.
... and the only response I get back right away is (500) Internal Server Error.
We are having the same problem. This issue was first observed at Octorber 8, 13:52:18:726 UTC. Nothing changed around that time on our side.
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 everyone,
Thank you for your patience. I have been able to reproduce the problem and have reported it to engineering. In the meantime, are you able to use the following endpoint until the problem is fixed?
GET https://api.fitbit.com/1/user/-/apiSubscriptions.json
Best AnswerHi Gordon -
Without changing anything else that's been working for us, I tried to GET a list of subscriptions for the current user for the default Subscriber ID using:
GET https://api.fitbit.com/1/user/-/apiSubscriptions.json
... and the result is no longer an immediate "(500) Internal Server Error" but is instead an immediate "(403) Forbidden" and the connection was drops.
I also tried:
... and still the GET call received an immediate "(403) Forbidden".
I'm open to trying other suggestions.
Kind regards.
Jay
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 everyone,
We've resolved the 500 error when using the activity collection, and I have confirmed it with my own app. Let me know if you are still receiving the error.