tokenExpiredStatusCode not expired in the ui anywhere?

Hi

I see tokenExpiredStatusCode is a thing - but how can I access this? I have an API that for oauth2 returns 403, not 401. Is there any way to solve this short of creating a custom node that specifices this value?

Can this be added to the oauth2 ui?

Welcome to the community.

Not sure if I understand, can you please elaborate? If you need to access the http response status, you can set the the Http Node parameter Full response to true.

Using oauth2 sign in - if the token expires and the server returns 401 n8n correctly refreshes the token.

In my case the server returns 403, not 401. In code there is a tokenExpiredStatusCode option that you can use to override this code. That’s not exposed in the UI however. So I’m guessing it works if you are doing custom modules, but not if you are using the standard ui for sign in.

I manually patched this in the code, checking for 401/403 by default - and that works fine. But it should be available from the UI.

Does that make sense?

Ahh, gotcha. I understand now. Good question. Currently, it’s not possible to set tokenExpiredStatusCode via the UI. However, it should not be difficult to add. I just added it to my to-do list.

Awesome, thank you!