steampy
steampy copied to clipboard
Can't create trade offer using steam_guard.json & trade_url
*UPDATE:
I applied the changes from PR and now it's logging in, but if I try to create a trade make_offer_with_url()
I get Response 401 Unauthorized...
Now I need help with it, so would appreciate any help. :')
Code:
# Code to login
# ...
# ...
# Returns "None" because receiving 401 Unauthorized
game = GameOptions.CS
my_items = steam_client.get_my_inventory(game)
my_first_item = next(iter(my_items.values()))
my_asset = Asset(my_first_item['id'], game)
x = steam_client.make_offer_with_url(items_from_me=[my_asset],
items_from_them=[],
trade_offer_url="https://steamcommunity.com/tradeoffer/new/?partner=150059734&token=m3TeWVQA",
message="test message")
here's a screenshot from steampy/client.py with debug values
--
Hello everyone,
somehow I can't login to steam using my steam_guard.json.
Do someone know how to fix it? Am I doing something wrong?
test.py
from steampy.client import SteamClient
steam_id = 123456789
api_key = "xxxxxxxx"
steam_client = SteamClient(api_key=api_key)
# Can read from file
with open(file="steam_guard.json", mode="r") as x:
print(x.read())
steam_client.login(username="xxxxx", password="xxxxx",
steam_guard=f"steam_guard.json")
# Returns False
print(steam_client.is_session_alive())
steam_guard.json
{
"steamid": "123456789",
"shared_secret": "xxxxxxxxx",
"identity_secret": "xxxxxxxxx"
}
Thanks in advance!
this worked for me, thanks to @xidios
show "code to login" or use login method and send a request for the function to create an ofer immediately after the login
def login: ***login ***login ***is_session_alive() if is_session_alive == True: main()
def main(): ***create order with your params