Hi,I have a website where the user can enter his nickname from chess.com. When he does this, the website checks his played games once a day, saves it in the database and generates statistics. I want to change the manual username entry to logging in via oauth the chess.com server. I want to make sure that the username the player provides actually belongs to him. The server provides access tokens. My question is: should I save tokens for each user (access and refresh token) and add them to the query for data of each user in turn when I retrieve information about their games? Now, having their usernames, I simply download the data I need from the API without adding tokens and everything works. Please advise.Thanks!
Avatar of mlody87pl
mlody87pl Dec 31, 2023
Under https://www.chess.com/events, if any event is going on, chess.com will show the live games. How are the moves and clock times determined in real time? Is there an external API to get this information?
Avatar of ChipDaWolf
ChipDaWolf Dec 29, 2023
Hello, I'm hoping to use the API to query a user's games archive and then walk the archive for games that have been evaluated by chess.com to search for positions with m3 or less. Based on the the Published Data API doc I'm not entirely sure this is possible. Is there currently any API support for seeing people's premium game evaluations?
Avatar of winstonpurkiss
winstonpurkiss Dec 8, 2023
I really like the game review feature at chess.com. I would be very interested if there is an API that allows me to submit a PGN for a game and to receive game review response. Any plans for this? It could allow Chess GUIs to integrate with chess.com.
Avatar of ShadowDeveloper
ShadowDeveloper Dec 8, 2023
They stole my championship. I cannot have this stay as such... I am not number zero: i triumphed and I want to see my opponents score underneath mine... anyone has had such troubles ? Have you found a way to get your due respect from Chess.com through service help/contact support means?
Avatar of ThroughtonsHeirAlexHebert
ThroughtonsHeirAlexHebert Dec 7, 2023
I am processing game result codes right now and have questions about some of them. Any help would be appreciated. I got the game result codes from https://www.chess.com/news/view/published-data-api#game-results I have questions about the following codes 1- Abandoned: What is the difference between abandoned and resigned? 2- Lose: Why would it say lose? Why wouldnt it say resigned, or checkmated? I want to know if these are used and if I should expect them to come up in endpoints. I have been checking some of them and most say "win" or "checkmated" or "agreed" etc...
Avatar of ShawnBierman
ShawnBierman Dec 7, 2023
So I have a python program that's querying the API and it's been working fine. A week ago or so I told support I had two accounts and it was approved. Well, now my program has been fine making calls to get PGN data from my newer account, but today I went to pull PGN data from the other account (SimpleChessBrah), and the JSON returned is an error message with error 503, with the message: An internal error has occurred. Please contact Chess.com Developer's Forum for further help https://www.chess.com/club/chess-com-developer-communityHelp would be appreciated.
Avatar of simplechessbro11
simplechessbro11 Dec 5, 2023
I don't think this exists, but it would be nice if chess.com could have a setting where you get notified whenever a new member joins your club(s). Could this possibly happen sometime? (btw I was told I should make a topic about this in this club; here is is: chess.com/clubs/forum/view/suggestion-notifications-for-new-members-in-clubs Chess.com Community Club)
I'm running a script that was working fine just yesterday, but today it blocks trying to get the games from this player: https://www.chess.com/stats/daily/chess/eddierapster Here we see there's some daily games that should be at least in the "finished", yet the API returns an empty list: https://api.chess.com/pub/player/eddierapster/matches Any clue what happens here?
Avatar of Martin_Stahl
Martin_Stahl Dec 2, 2023
Hey everyone, I am new to the world of coding and am going to start a major in data analytics soon. I did a little IBM course to get a feel for the subject, but the projects were very much engineered, and didn't feel like I was actually doing anything. So, I decided that on my first 'real world' project, I would make something that can grab the API for my stats so I can make a regression plot for my Elo or just some neat graphs or something. It didn't take long for me to get my first error, and after consulting with the almighty chat-gpt, I have been led here to try and solve my problem. The error I am getting is a 403 error which seems to indicate that my authentication is being blocked. Any help would be appreciated, and is this project something I can even do?
Avatar of Takin_These
Takin_These Nov 30, 2023
Hey, I wanted to program something that could say what move was played and then when I thinked I could say what move I want to play and the program plays it on chess.com (for example with a bot). So that I could train to play blinfolded. Do you know if something like that already exist ? and if not, do you know what api I can use to get and control my navigator (which can be anything, like opera or chrome) or even my chess com account to do so ? Thank you.
Avatar of Louloufou63
Louloufou63 Nov 28, 2023
Hey guys, was wondering if anyone could help me in doing the following task:- take a game link as input- grab the pgn from that game in such a format that I can modify it to do things like: -- remove ratings, -- change and use variables to modify usernamesthen print the pgn Preferably in python. I've seen many posts about using many pgns or pgns of a certain user, so was wondering if this was even possible! Thanks.
Avatar of ninjaswat
ninjaswat Nov 27, 2023
Sharing some scripts I've created. They are functional and I could make them more user-friendly if there is any interest. Chess Power Tools is a collection of scripts that can help do the following: Export chess games from Chess.com in JSON and PGN format (chesscom-export) Import chess games from PGN to SQLite DB (pgn2sqlite) The next script I'm planning is for more analysis. For example, expand the SQLite DB to include a table for moves and fields such as: Position (FEN) Engine evaluation Move evaluation Centipawn loss and more (I'm taking suggestions)
Avatar of chesslover0003
chesslover0003 Nov 26, 2023
Hello chess devs! I want to share with you a project that I've been working on. As a chess enthusiast who got hooked on the game by watching streamers, I wanted to create something that bridges the gap between chess gameplay and streaming. So, I've developed a website that brings together the best of both worlds: Chess.com and Twitch! You can find it at chessvod.com. What Can You Do on the Website? Duel Stream Setup: Watch your favourite streamers go head-to-head by seeing both streamers' clips, side by side. Personalised Experience: Ever played against a streamer? Enter your chess.com nickname and discover clips of your games that were streamed. It's a unique way to see your gameplay from a new perspective. Enter someone’s else’s name, like Magnus Carlsen, and see how they react when they realise that they are playing against the world champion. Behind the Scenes: Integration with Chess.com: The website automatically fetches data about streamers and their games from the chess.com API. Twitch Video Insights: By integrating Twitch's video details, the site determines if a chess.com game was captured in a streamer's video. This feature allows for a seamless connection between the game and its streamed footage. What’s next? Discord Bot Integration: Getting a ping whenever there is a clip where you play against a streamer. If you have any feedback, please let me know
Avatar of NoBlunderNoGain
NoBlunderNoGain Nov 13, 2023
Hi, I just noticed that my games archive returns an empty set of games, even though I just played a couple of games. This is the first time I see this: https://api.chess.com/pub/player/paintednow/games/2021/10 The response is just an empty set of games, i.e. {games: [ ]} Any ideas/tips what is going wrong? Thanks, PaintedNow
Avatar of SwissCookieMan
SwissCookieMan Nov 11, 2023
Hey Chess Developers! I wanted there to be an easy way to watch top level online chess in almost real time so I created a youtube channel called chess-almost-live, that livestreams recently completed games on chess.com (and that other site as well). Here's how it works: a live stream kicks off whenever a minimum of 4 top games conclude within the past 30 minutes. A game is selected and replayed and when it finishes, viewers get to vote on the next game to stream by commenting in the chat. I am hoping that the channel makes these top games more accessible to a wider audience and can serve to grow chess and help people (myself included!) improve their game. The lofty goal is to create a little chess community and collaborate with other channels. If anyone has any questions, wants to collaborate, or simply wants to understand the technical side or the code, I would be happy to chat! Also, a huge thanks to chess.com for their amazing API!https://www.youtube.com/@chess-almost-live
Avatar of SaldeanKnight
SaldeanKnight Nov 11, 2023
Has anyone else run into an issue where you get HTTP 500 errors at some point after sending back-to-back requests with an Authorization header? After some amount of requests, I just get constant errors. For example - I send 20 requests synchronously, and then the subsequent requests all return HTTP 500. APIs work fine via my browser, so it must have something to do with my program. The only change I made was adding an authorization header with the token I obtained. I'm not sending requests in parallel and I have the user-agent header included. It seems to work fine if I don't include the authorization header. I'm following the example from the OAuth documentation: Authorization: Bearer {access_token}. Being a 500 I'd assume it's not on my end. Is this a known issue or am I missing something?
Avatar of stephen_33
stephen_33 Nov 11, 2023
After recent attack on chess.com servers looks like the whole provider Digital Ocean is blocked. I checked location: USA (NY, SF), Singapore, Amsterdam Response is almost instant (which is a sign of simple logic behind) Below SS when accessing the site regular way, the same error when using API
Avatar of zainsworth
zainsworth Nov 9, 2023
I posted this in the wrong forum topic, so decided to create my own topic. I have built a unique tournament competition (that runs on Chess.com using APIs from here) that has many elements that solve many issues about online chess. It introduces a completely new concept that ties into my tournament concepts: PPM, which stands for "Progressive Performance Metric." Essentially, PPM represents a calculation that tracks and evaluates how performance progresses or advances over a series of events or activities. More on that later. One of my goals was to enable lower-skill-level players to compete equally with higher-skill-level players. I use a 4 person team format with a novice, 2 intermediate, and an advanced player on a team. I use a sort of all the players based on their skill levels in the roster of qualified 'rapid' chess players who have signed up for the event. The makeup of teams changes from day to day as players' skill levels change. There is a leaderboard that accumulates points earned from daily matches, adds them to any previously earned points, and posts the top point winners to a Leaderboard. Chess.com awards diamond memberships to the top 4 players on the Leaderboard at the end of each Month., I zeroed out the points and started over again each month. The system for awarding points is unique. It is not a traditional system awarding 50%, 30% and 20%. I use a simple formula for getting a basic award unit, x=n*(n+1)/2 so that n is the number of participants. I then take the total points to be awarded, bpu =((4.8 x n)/x), and divide that by x to obtain the basic price unit, or bpu. Let's say we have 4 teams winning. !st place would get 4 times the bpu, 2nd gets 3 times bpu, 3rd gets 2 times bpu and 4th gets bpu. I have never heard of that method of prize distribution anywhere. The design of the system is such that no matter how many participants (and it is designed to handle thousands each day), there will be awards distributed based on a ratio. That ratio can be one winner in ten, one in 20, one in 30, and so on. A player could participate in as many different events as they desire. Since we use a person's Chess.com rating average over 7 matches, they can be applied to many events, depending on how the events we set up. I began having two events a day - winner-take-all, and 1 winner for every 10 participants, however, I am just running the one winner for every 10 participants now. Depending on the Chess playing community, I could expand the event count. Turning to the event itself. I use the PPM method to compare changes in a player's skill level averages. I add 7 previous ratings awarded to a player playing rapid games on Chess.com. I divide that by 7. That gives me a player's starting average. I then add the results from the rating from the most recent match to the previous 6 matches, divide that number by 7 and I have determined the current rating average. I subtract the starting average from the current average and that gives me their PPM. It is usually a number with more than 6 decimal places and that keeps ties to a very very rare occurrence. Now each player's PPM is applied to the team's total PPM. I compare this team total to all the other teams to determine who is on the winner's roster. CHEATING!!!. How? So what? Using the PPM method a player cannot use a single match but must depend on the play of their teammates and who are they? A cheater would not know and all games are tracked and their ratings averaged. Why do I post the results off-site from Chess.com? Good question for which I do not have an answer. I believe the competition incentivizes players of ALL skill levels to participate in an International event, that runs EVERY SINGLE DAY. I would hope that someone from Chess.com recognizes the uniqueness of the competition, its out-of-the-box methodology, and its potential for expansion into the online E-Chess gaming community. I have been running the event daily for quite a few months now. I would be willing to open-source the code if someone expressed an interest, even turning over the concept to Chess.com. I only want to be recognized as the Author of the idea and developer of the original code.
Avatar of YankeeBastid
YankeeBastid Nov 5, 2023
In the past I spent time designing a chess GUI but never continued to develop the code. If you're interested in UI/UX design and software development let me know. I might like to revive this project of mine and create a ochessbase clone.
Avatar of chesslover0003
chesslover0003 Oct 28, 2023
Admins