Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login error: HTTP: 404 Not Found #150

Open
r4m0n opened this issue Apr 20, 2023 · 6 comments
Open

Login error: HTTP: 404 Not Found #150

r4m0n opened this issue Apr 20, 2023 · 6 comments

Comments

@r4m0n
Copy link

r4m0n commented Apr 20, 2023

Since yesterday login has been failing with a 404 error, maybe the API changed? I tried removing the token and authenticating again, it didn't have any trouble getting the new token, but still can't log in.

(Using bitlbee here, but it doesn't seems related)

steam - Logging in: Connecting
steam - Logging in: Sending logon request
steam - Login error: HTTP: 404 Not Found
steam - Logging in: Signing off..

@namtsui
Copy link

namtsui commented Apr 20, 2023

I am seeing this, too.

@tatokis
Copy link
Contributor

tatokis commented Apr 20, 2023

Given the 404, the whole ISteamWebUserPresenceOAuth interface (which includes the poll method that's used to fetch messages) is most likely gone, which means the whole plugin needs to be rewritten to use the new websocket+protobuf API.

Unless this is somehow an accident on Steam's end (which seems unlikely given that none of their products use this API anymore), there's no way to work around this unfortunately.

@roughnecks
Copy link

:(

1 similar comment
@tprepper
Copy link

tprepper commented Jun 1, 2023

:(

@tprepper
Copy link

tprepper commented Jun 1, 2023

Any idea how one could start creating a plugin compatible with the new API?

@PCPisChill
Copy link

Any idea how one could start creating a plugin compatible with the new API?

Send/Receive Protobufs:
https://github.com/ValvePython/steam/blob/master/steam/client/builtins/unified_messages.py
https://github.com/ValvePython/steam/blob/master/steam/core/msg/__init__.py
https://github.com/ValvePython/steam/blob/master/steam/core/msg/unified.py

Login:
https://steamapi.xpaw.me/#IAuthenticationService
https://github.com/ValvePython/steam/blob/9004636d7cccd90ef914b86c1b11fa3f95605e96/steam/webauth.py

FriendsList:
https://github.com/ValvePython/steam/blob/master/steam/client/builtins/friends.py

Protobufs for Send Message:
FriendMessages.SendMessage#1
ChatRoom.SendChatMessage#1 (Group Chats)

    def send_message(self, message, groupid=0, chatroomid=0):
        if groupid == 0:
            if self._steam.chat_mode == 2:
                self._steam.send_um("FriendMessages.SendMessage#1", {
                    'steamid': self.steam_id,
                    'message': message,
                    'chat_entry_type': EChatEntryType.ChatMsg,
                    })
        else:
            self._steam.send_um("ChatRoom.SendChatMessage#1", {
                'chat_group_id': groupid,
                'chat_id': chatroomid,
                'message': message,
            })

Protobufs for Receive Message:
FriendMessagesClient.IncomingMessage#1
ChatRoomClient.NotifyIncomingChatMessage#1 (Group Chats)

    self.on("FriendMessagesClient.IncomingMessage#1", self.__handle_message_incoming2)
    self.on("ChatRoomClient.NotifyIncomingChatMessage#1", self.__handle_group_incoming)

    def __handle_message_incoming2(self, msg):
        if msg.body.chat_entry_type == EChatEntryType.ChatMsg:
            user = self.get_user(msg.body.steamid_friend)
            self.emit("chat_message", user, msg.body.message)

    def __handle_group_incoming(self, msg):
        user = self.get_user(msg.body.steamid_sender)
        self.emit("chat_message", user, msg.body.message, msg.body.chat_group_id, msg.body.chat_id)

Protobufs for Message History:
ChatRoom.GetMessageHistory#1
https://github.com/ValvePython/steam/blob/6f955c4b4d28dc800c38f10a33f9a18e09b83c51/protobufs/steammessages_chat.proto#L454-L482

EChatEntryType
class EChatEntryType(SteamIntEnum):
    """Doc: https://partner.steamgames.com/doc/api/steam_api#EChatEntryType"""
    Invalid = 0
    ChatMsg = 1             #: Normal text message from another user
    Typing = 2              #: Another user is typing (not used in multi-user chat)
    InviteGame = 3          #: Invite from other user into that users current game
    Emote = 4               #: text emote message (deprecated, should be treated as ChatMsg)
    LobbyGameStart = 5      #: lobby game is starting (dead - listen for LobbyGameCreated_t callback instead)
    LeftConversation = 6    #: user has left the conversation ( closed chat window )
    Entered = 7             #: user has entered the conversation (used in multi-user chat and group chat)
    WasKicked = 8           #: user was kicked (data: 64-bit steamid of actor performing the kick)
    WasBanned = 9           #: user was banned (data: 64-bit steamid of actor performing the ban)
    Disconnected = 10       #: user disconnected
    HistoricalChat = 11     #: a chat message from user's chat history or offilne message
    Reserved1 = 12          #: No longer used
    Reserved2 = 13          #: No longer used
    LinkBlocked = 14        #: a link was removed by the chat filter.

Can find profobufs with NetHook2 & NetHookAnalyzer2 or SteamDatabase/Protobufs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants