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

Bug: "401 Unauthorized" error has changed

ANSWERED

During our recent maintenance period, we have discovered that some of the 401 Unauthorized error messages related to tokens have changed, and are not returning the "error_type". Any application that uses the "error_type" value to know when a token has expired or is invalid, will likely be impacted.

We are working on a fix to revert the 401 message back to its original syntax ASAP. Future updates will be posted here.

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

Accepted Solutions

I want to let you know that we have fixed the "expired_token" error.   We have reverted the error back to the syntax.

{
  "success": false,
  "errors": [
    {
      "errorType": "expired_token",
      "message": "Access token expired: <access_token>. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."
    }
  ]
}
Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

I want to let you know that we have fixed the "expired_token" error.   We have reverted the error back to the syntax.

{
  "success": false,
  "errors": [
    {
      "errorType": "expired_token",
      "message": "Access token expired: <access_token>. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."
    }
  ]
}
Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi Gordon,

I was just coming on the forums to ask about this, as we've had a number of our error handlers fail.

However, I don't think it's limited to 401.

We've also seen changed formats on on others:

Today I had a 403:

 

{
	"error": {
		"code": 403,
		"message": "The caller does not have permission",
		"status": "PERMISSION_DENIED"
	}
}

 

 

We're also seeing this on 429:

 

{
	"error": {
		"code": 429,
		"message": "Resource has been exhausted (e.g. check quota).",
		"status": "RESOURCE_EXHAUSTED"
	}
}

 

These all used to be handled cleanly at our end, but now the client lib I'm using (Fitbit.NET) is falling over itself when trying to handle them.  I was going to create a patch for the lib, but I'm not clear what to expect now.. none of this seems to corrospond to the docs.

 

Best Answer
0 Votes