You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To initialize your client you simply have to create a new instance of the AternosClient class providing your session token in the constructor. After that you have to call the #PrepareAsync method which will try to fetch the current ajax token which is required to access the endpoints. Because of anti bot measurements the fetching process can potentially fail, by default it's limited to 200 attempts (should take way less attempts to successfully get the token). Success is being indicated by the return value of the method, true meaning that the ajax token has been fetched successfully and false meaning that it failed to fetch it after 200 attempts.
varaternosClient=newAternosClient("<YOUR ATERNOS TOKEN>");varresponse=awaitaternosClient.PrepareAsync();if(response.Failed()){Console.WriteLine("Failed to fetch ajax token!");return;}// Proceed