diff --git a/IdeabizDemo/IdeabizDemo/IdeabizHandler/IdeabizRequestHandler.cs b/IdeabizDemo/IdeabizDemo/IdeabizHandler/IdeabizRequestHandler.cs index c75bd3a..0e270a8 100644 --- a/IdeabizDemo/IdeabizDemo/IdeabizHandler/IdeabizRequestHandler.cs +++ b/IdeabizDemo/IdeabizDemo/IdeabizHandler/IdeabizRequestHandler.cs @@ -28,7 +28,7 @@ public IdeabizResponse sendAPICall(String URL, IdeabizAPIAuth.REQUEST_METHOD met IdeabizResponse response = idabizAuth.sendRequest(URL, method, body, contentType, "Bearer " + idabizAuth.ACCESS_TOKEN,accept); - if (response.Status.Equals("ERROR") && response.StatusCode==401 && response.Body.Contains("Expired")) + if (response.Status.Equals("ERROR") && response.StatusCode==401 && (response.Body.Contains("Expired") || response.Body.Contains("Inactive"))) { IdabizAuth.renewToken(); response = idabizAuth.sendRequest(URL, method, body, contentType, "Bearer " + idabizAuth.ACCESS_TOKEN,accept); diff --git a/IdeabizHandler/IdeabizRequestHandler.cs b/IdeabizHandler/IdeabizRequestHandler.cs index b599d5e..4d35898 100644 --- a/IdeabizHandler/IdeabizRequestHandler.cs +++ b/IdeabizHandler/IdeabizRequestHandler.cs @@ -28,7 +28,7 @@ public IdeabizResponse sendAPICall(String URL, IdeabizAPIAuth.REQUEST_METHOD met IdeabizResponse response = idabizAuth.sendRequest(URL, method, body, contentType, "Bearer " + idabizAuth.ACCESS_TOKEN,accept); - if (response.Status.Equals("ERROR") && response.StatusCode==401 && response.Body.Contains("Expired")) + if (response.Status.Equals("ERROR") && response.StatusCode==401 && (response.Body.Contains("Expired") || response.Body.Contains("Inactive"))) { IdabizAuth.renewToken(); response = idabizAuth.sendRequest(URL, method, body, contentType, "Bearer " + idabizAuth.ACCESS_TOKEN,accept);