Invalid argument in authentication request

Newbie991609 Posted 20 Mar 2024 19:35

Last edited by Newbie991609 20 Mar 2024 19:53.

Hi! I'm trying to authenticate using POST request, but got response "Invalid argument" and code 301.

I'm generating random int using "self.rand_int = randint(0, (1 << 32) - 1)", also I tried to use "2144632130" value, which I get in documentation, but nothing changed.

My code given below:

def get_token(self):
    rand_int = 2144632130
    api_address = f"https://{self.get_ip_address}:7443/sangforinter/v1/auth/party/login?verify=False"
    auth_string = hashlib.sha1(f"{rand_int}{self.get_password}sangfor3party{self.get_username}".encode('utf-8')).hexdigest()
    data = {
            'rand': rand_int,
            'userName': self.get_username,
            'clientProduct': '',
            'clientVersion': '',
            'clientId': '',
            'desc': '',
            'auth': auth_string,
            'platformName': self.get_platform_name
        }
    response = post(url=api_address, data=data, verify=False)
    return response.text

Any help would be very appriciated. Thanks in advance!

Tammee Ong has solved this question and earned 10 coins.

Posting a reply earns you 2 coins. An accepted reply earns you 20 coins and another 10 coins for replying within 10 minutes. (Expired) What is Coin?

Enter your mobile phone number and company name for better service. Go

I Can Help:

Change

Moderator on This Board

12
23
0

Started Topics

Followers

Follow

36
1
0

Started Topics

Followers

Follow

Trending Topics

Board Leaders