Sending post request with steambot

441 views Asked by At

so i´m working on a program that sends a post request to a steamgroup, so that a announcement is created, but sadly it isn´t working well, i captured the "parameters" that are required with TamperData, and more or less tried to replicate it in c#. Didn´t worked so well, maybe someone from here can help me.

        var data = new NameValueCollection();
        data.Add("sessionID", SteamWeb.SessionId);
        data.Add("action", "post");
        data.Add("headline", "EXAMPLE HEADLINE");
        data.Add("body", "EXAMPLE BODY");


        string url = "http://steamcommunity.com/groups/GROUP/announcements/create";
        string referer = "http://steamcommunity.com/groups/GROUP/announcements/create";

        SteamWeb.Fetch(url, "POST", data, false, referer);

Thats my code, maybe someone can help me.

regards

1

There are 1 answers

0
a-ctor On

I've tested the posting with fiddler and it worked. Here are some hints:

  1. The steam client is using the url http://steamcommunity.com/groups/<GROUPNAME>/announcements to post an announcement
  2. You parameters are the right ones but the cookies are missing. You need two of them: The sessionid cookie contains the Session id (the same as in the parameter) and the steamLogin cookie (looks something like this: 73561298352707625||62E520F5D92EFDE9C3794BFD00C739385B0AA77C).

I have tested it Fiddler and it works.