overv / steamwebapi Goto Github PK
View Code? Open in Web Editor NEWLibrary for C# giving access to the functionality of the Steam Web API.
License: MIT License
Library for C# giving access to the functionality of the Steam Web API.
License: MIT License
Hello Overv, at first thx for the great work, but since a few days, the request.GetResponse() returns always a 'Internal Server Error'.
When working on a little app using this API, not all messages were returned by Poll().
This will be looked into as soon as possible.
The Authentication Session provided by steam only stays alive up to 30 seconds after the last request was made on that key.
After 30 seconds the Programs is required to re-authenticate with Steam and currently your application provides no method of doing that.
Your application should either keep the session open OR automatically re-authenticate with Steam on a new request if required.
I know it's not an actual issue, but I opened one because this project was abandoned. If it truly was, kindly hand it over to me, I will take care of it. If it was not, allow me to be a collaborator of some sort in the project and I will attempt to get the steam trade API going.
When i was trying to login, it didnt worked, and showed me an http error. It might be ISteamOAuth2/GetTokenWithCredentials/v0001 that doesnt exist, what should i do?
Seems they changed something in API. That method is gone.
Hi there!
I like this API, but right now you haven't provided a license under which this source can be used. If you could do so that'd be awesome!
hello, i have two problems with your code
1- The name 'data' does not exist in the current context
2- Can not implicitly convert type 'int' in 'Steam Web API.SteamAPISession.LoginStatus'. An explicit conversion exists (check for missing a conversion)
The problems are in the following method:
public LoginStatus steamGuardRequest(String username, String password) {
String response = steamRequest("ISteamOAuth2/GetTokenWithCredentials/v0001",
"client_id=DE45CD61&grant_type=password&username=" + Uri.EscapeDataString(username) + "&password=" + Uri.EscapeDataString(password) + "&x_emailauthcode=0&scope=read_profile%20write_profile%20read_client%20write_client");
if (((string) data["x_errorcode"]).Equals("steamguard_code_required")) {
return 1;
} else {
return 0;
}
}
Not sure if this is because steam changed how logins work or because steam's login is down, but I'm getting a WebException: Could not find remote server
during SteamAPISession.Authenticate()
.
Here's the relevant part of the code:
SteamAPISession session = new SteamAPISession
// ...
Console.WriteLine("Logging in...");
LoginStatus logStatus = LoginStatus.LoginFailed;
try
{
logStatus = session.Authenticate(username, password);
}
catch (Exception e)
{
Console.WriteLine("Could not log in: " + e.Message);
Console.ReadKey();
return;
}
Is this a problem with my code or with the API?
The error occurs when SteamAPISession session = new SteamAPISession();
hello, i have two problems with your code
1- The name 'data' does not exist in the current context
2- Can not implicitly convert type 'int' in 'Steam Web API.SteamAPISession.LoginStatus'. An explicit conversion exists (check for missing a conversion)
The problems are in the following method:
public LoginStatus steamGuardRequest(String username, String password) {
String response = steamRequest("ISteamOAuth2/GetTokenWithCredentials/v0001",
"client_id=DE45CD61&grant_type=password&username=" + Uri.EscapeDataString(username) + "&password=" + Uri.EscapeDataString(password) + "&x_emailauthcode=0&scope=read_profile%20write_profile%20read_client%20write_client");
if (((string) data["x_errorcode"]).Equals("steamguard_code_required")) {
return 1;
} else {
return 0;
}
}
Without modifying your existing code the Application using your library is unable to save the User Authentication Key to use later. Which means when reopened a user with steam guard would have to login with their Username & Password and get another Steam Guard Authentication Code.
You need to provide a method/property for accessing the Authentication Key. So an Application only needs to ask for the Users Username/Password once if needed, and does not need to store them.
On any request I make which is not immediately after the last one I will receive a SSL/TLS Certificate Error from the GetRequestStream() function.
I made a workaround by re-submitting the request which seems to allow it to go through. However it would be nice if it worked without having to make a second request.
Great work so far fellas,
One thing though, actually two. First, you should change line #32 of the example program to read;
Console.WriteLine( "You have " + ( friends.Count - blockedFriends ) + " friends and " + blockedFriends + " fiends blocked!" );
else it says "you have friends and friends.
The second item would be to add a pause at the end, so that you can read them message. Then hit space to continue to the application end.
Thanks for all your hard work though, much appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.