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

Seeing a lot of 500 internal server errors today.

ANSWERED

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

Best Answer
1 BEST ANSWER

Accepted Solutions

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.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
13 REPLIES 13

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.

Best Answer

@jeaglemc ... I'm looking into your problem.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

@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?

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

(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.

Best Answer

Hi - 

We're also having the same issue in our app. Any updates?

Best Answer

Thanks - this is the same issue that we are now experiencing. Any guidance would be most welcome.

Best Answer

We're having the same issue on our side. Why does the API Status page not reflect this issue?

Best Answer

Hi @GordonFitbit,
Unfortunately we are also facing the same issue, and we are receiving many client tickets due to this issue.
Any positive update would be verymuch appriciated.

Regards,
Gayan

Best Answer

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.

Best Answer

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

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi 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
0 Votes

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.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Hi Gordon -

It does indeed appear to be working again.  Thank you!

Kind regards.

Jay

Best Answer
0 Votes