Post

2 followers Follow
0
Avatar

Unauthorized status after several log in

Hello,
I'm currently developing an Angular app which uses the Clarizen's REST API 2.0.
Since i'm testing several things on my frontend, I often use the login and logout endpoints from the API... And I just realized after several login attempts (successful or not), the API just sends me a 401 (Unauthorized) response.

Is it possible to make some test without be bothered by that ?

Thank you,

Mickael.

Mickael Bonfill Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Mickael,

You cannot access the REST API without a valid session ID. HTTP 401 code suggests your login failed or your session was timed out.

It is a good practice to check the results of the API call and re-login if your session was timed out. If your login was unsuccessful, an HTTP 401 result is the expected behavior.

I didn't figure out if you have encountered an unexpected behavior through your tests (meaning you successfully logged in and couldn't use the API). If you did please comment below and try to provide a detailed scenario.

Hope this helps,

Ophir 

Ophir Kenig 0 votes
Comment actions Permalink