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

500 error when calling /oauth2/revoke

In our product, we use webhook to be notified of new activity by our users. However, when fetching their new activities, sometimes we're not able to get a refresh token for an unknown reason. Therefore, we can no longer fetch data for this user even though we're still getting notifications of updated data. 

 

To solve this problem, we want to force the user to reauthorize again to get a new token. We do this by calling the /oauth2/revoke endpoint. However, in our logs we keep seeing 500 errors from this call. I have included some error ids below.

 

My question is whether this is the right away to go about this? Or is there a better way to stop the subscription so we're not trying endlessly to fetch data and failing.

 

Here are some of the latest errors we've seen from the call to /oauth2/revoke :

{"errors":[{"errorType":"request","fieldName":"500","message":"Oops! An unexpected error occurred. If it continues please report it at help.fitbit.com. Error id: 2a575267c1c89fc25780b376f15c1e24:172.22.23.161:63192"}],"success":false}

 

{"errors":[{"errorType":"request","fieldName":"500","message":"Oops! An unexpected error occurred. If it continues please report it at help.fitbit.com. Error id: 50fb85a1e5e0ad006567ffb19de18593:172.22.19.200:62467"}],"success":false}

 

{"errors":[{"errorType":"request","fieldName":"500","message":"Oops! An unexpected error occurred. If it continues please report it at help.fitbit.com. Error id: 391d121db577f9493f6624dd12ada133:172.22.22.116:63939"}],"success":false}

Best Answer
0 Votes
3 REPLIES 3

Hi @grokker-dev 

 

When you received the 500 error, did you want a few minutes and try the same request again?   If so, what happened?

 

Thanks!

Gordon

 

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

I don't have an easy way to retry. We just call that when we receive a notification. I think it's related to https://community.fitbit.com/t5/Web-API-Development/Remove-subscriptions/m-p/5271805#M14868 , but the error returned is not very helpful. 

Best Answer
0 Votes

I can try to look in our logs for any 500 errors on the revoke endpoint.   In the future, the 500 errors are generic errors.   See https://dev.fitbit.com/build/reference/web-api/troubleshooting-guide/error-messages/#500-internal-se....   When you receive this error, you should wait a few minutes and retry your request.   If the problem persists, then we can investigate why you keep getting the 500 error.

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