How to run again test case inside himselft?

i have a test case and run it.
every things is OK, when status code is 401, call login service and get token, now i wanna call again this test case

is it possible?
sorry for poor my English
thank you

Is there any possibility that your test case will run in endless recursion if doing so?

no, there is not.

making a script to call himself is generally a bad idea, in every aspect and in every programming language.
(this technique it is also known as ‘fork bomb’)
a better approach is to make the ‘login service and get token’ a separate testcase and call it every time before to run the actual testcase (or based on certain conditions)