If access token gets expired, what error/code should we expect from ServiceNow?

dewanpavel
Kilo Contributor

We are using ServiceNow for authentication for another third party app. We are using oauth token. While using the app, after sometime, we get pop up window comes up for login. I believe this happens because the access token gets expired after certain time. We need to know what code/error ServiceNow sends back when the the access token gets expired?

2 REPLIES 2

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Hi Dewan,



I believe ServiceNow sends a HTTP 401 error response, something like;



http:/1.1 401 Unauthorized with code: 401



Regards,


Sergiu


Hi Sergiu



Thanks for your response.



However, I have also noticed ServiceNow logs the following for access token expiration:



Oauth authentication failed for access token:


{access token string}




Can we pass different code for access token expiration or the log entry to the client?



Thanks


Dewan