Skip to main content
Question

Acumatica token

  • July 17, 2026
  • 2 replies
  • 36 views

hello,

I am using Resource owner password flow to get Acumatica token.

I am encountering an intermittent issue across all environments, including Production.

When we receive an application for processing, we call the Acumatica Get Customer endpoint using a valid authentication token. Occasionally (approximately once a day or every other day), the request fails because the response cannot be deserialized. Our application expects a JSON response, but instead receives an HTML page, as shown below.

 

We cache the authentication token and validate it each time it is retrieved from the cache. Token validation is based on the Date header returned in the token generation response to ensure the token has not expired.

 

Could you help us determine why the API is intermittently returning HTML instead of the expected JSON response, despite the token being valid?

Tokens:

return html response : LqGoqJP-MvG2Q44kKI_QEq0PqziBlrWXnInucaZS9w0
return Json (Valid): IPLN2zlT8ui3GzGoySRC2M5nyz0Xa-StJ3cup25MAnc

if (response.Headers.TryGetValues("Date", out var dates) &&

     DateTimeOffset.TryParse(dates.FirstOrDefault(), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out var start))

{

     detail.TokenStartTime = start.UtcDateTime;

}

 

 

private static bool IsValid(AcumaticaTokenDetail token)

{

    if (string.IsNullOrWhiteSpace(token.AccessToken)) return false;

    if (!token.TokenStartTime.HasValue) return false;

    return token.TokenStartTime.Value.AddSeconds(token.ExpireIn) > DateTimeOffset.UtcNow;

}

 

 

This is the error details:

 

Acumatica "GET Customer?$filter=CustomerId eq '1631506'" deserialization failed. Raw response: "<!DOCTYPE html>

<html>

<head>

    <meta charset=\"utf-8\">

    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">

    <base href=\"../\">

    <link rel=\"icon\" type=\"image/x-icon\" href=\"Icons/site.ico\" />

    <script defer src=\"Scripts/Error/vendors.80ce324be3a2b5d43ef9.bundle.js\"></script><script defer src=\"Scripts/Error/app.57987879c4fc02d63fac.bundle.js\"></script>

</head>

<body aurelia-app=\"main\">

</body>

</html>"

 

2 replies

  • Author
  • Freshman I
  • July 20, 2026

Any update on above concern. I am using Resource Owner Password flow

why sometime getting invalid token. like this one LqGoqJP-MvG2Q44kKI_QEq0PqziBlrWXnInucaZS9w0
 

when I use it to get a customer info I get html error instead of meaningful response.

Is there any configuration setting in Acumatica might be missing?

 

<!DOCTYPE html>

<html>

<head>

    <meta charset=\"utf-8\">

    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">

    <base href=\"../\">

    <link rel=\"icon\" type=\"image/x-icon\" href=\"Icons/site.ico\" />

    <script defer src=\"Scripts/Error/vendors.80ce324be3a2b5d43ef9.bundle.js\"></script><script defer src=\"Scripts/Error/app.57987879c4fc02d63fac.bundle.js\"></script>

</head>

<body aurelia-app=\"main\">

</body>

</html>"

 


Forum|alt.badge.img+9
  • Captain II
  • July 21, 2026

If you look at the script tags:  

<script defer src=\"Scripts/Error/vendors.80ce324be3a2b5d43ef9.bundle.js\"></script><script defer src=\"Scripts/Error/app.57987879c4fc02d63fac.bundle.js\"></script>

You can see here that this is an error screen, this could be because of a customer id that is not found or potentially restricted by row level security which the API user is not assigned to.

 

You could turn the request profiler on and look at the exception details to give you a better understanding of the error that Acumatica is throwing.

 

Also, I wouldn’t paste tokens into online forums.