Question

Intermittent error OAU-213 Token not Found error when refreshing using .Net library

  • 4 December 2020
  • 1 reply
  • 574 views

Hi


I am using the .Net library as I am getting an intermittent error when using the await rc.Refresh() method where rc is RestClient. I call the refresh method before the token has expired.

The response I get when it has errored is:

Response:
StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Connection: keep-alive
  X-Application-Context: application:8080
  RCRequestId: ba572a7c-357f-11eb-b754-005056b58a26
  Pragma: no-cache
  AceRoutingKey: ams01-c01-ace02.75bacc1c-0756-11eb-a2dd-005056b5fcaa
  RoutingKey: ZRH01P32
  Cache-Control: no-store
  Date: Thu, 03 Dec 2020 15:53:46 GMT
  Server: nginx
  Content-Length: 161
  Content-Language: en
  Content-Type: application/json; charset=utf-8
}
Content: {
  "error" : "invalid_grant",
  "errors" : [ {
    "errorCode" : "OAU-213",
    "message" : "Token not found"
  } ],
  "error_description" : "Token not found"
}

I am wondering if you can help? This doesn't happen all the time and generally the token refresh is done every 59 minutes


1 reply

What is your SDK version?

Instead of refresh 59 minutes, refresh every 30 minutes.


There is a 5-active-tokens limit. So if you are requesting tokens too frequently, old ones will be invalidated, thus "not found".

Reply