I have been trying to use the REST API in order to create a challenge to a specific player and I keep getting a 500 error. I am doing a POST request to the endpoint https://online-go.com/api/v1/players/1010712/challenge/, where the body of the request is as follows
I have been able to access the /api/v1/me/settings endpoint, but have not had any success with others yet (I haven’t done extensive testing with them yet, challenging is the first part).
Hopefully, when I get everything with this project working rengo will be supported
Thank you so much! It looks like I was missing a couple of parameters that were not specified in the documentation. It also seemed to help (I’m using the python requests module) when I manually specified the Content-Type header (I thought I didn’t need to, but I guess providing custom headers overrides that) and by using the json parameter instead of the data parameter
I am working on a Discord bot that will work to handle rengo on OGS by having an unranked game between 2 accounts controlled by the bot, where the moves come from a Discord server
glad it helped. Yeah, unfortunately some of the params are not listed in the documentation. I lifted them either from elsewhere on the forum and/or I inspected the network logs of OGS when making a game
sounds neat! I once set up a site where players were shown an iframe of OGS and given a login to use in the iframe. Then I blocked the players moves when it wasn’t there turn and showed some visuals as well.
Yeah, inspecting my network traffic was going to be my next step if I didn’t get a response soon enough. I very well may end up doing that for the other endpoints I need, if I can’t figure them out
That sounds like a cool way of doing it. Hopefully this bot works out and catches on among the player base. I plan on making it open-source once it’s working, so anyone can register a bot and use it