Hello,
I’ve been working on a client for OGS as a study project. However I am finding the documentation on both the real-time API and REST api lacklustre. To start, I am aware of and have read the documentation on both. So far I managed to have the client authenticate (via REST) and connect to a live game (via Socket.io).
The problem is I am unable to submit a move on behalf of the player logged in. Trying to do so via REST generates a server error 500 (internal server error). So I tried to accomplish that through socket.io, which, according to the docs, requires an auth token that is supposedly provided by REST. At first I assumed it’s the OAuth2 token obtained upon authorization, but that doesn’t seem to work. Nowhere in either docs mentions another way to obtain auth tokens for a user’s game.
A quick ping to @matburt since anoek said you’re the guru on that subject. Any help is appreciated
Edit: I had a look over OgsDroid’s source code and found many undocumented socket.io endpoints, including a vital one known as “authenticate”. As a suggestion I highly recommend the developers to update & complete the API docs. There have been many discrepancies in endpoint links in the REST api as far as I am aware of as well.
Edit 2: Ah my poor English comprehension skills has allowed me to misinterpret a vital section on the API docs. The problem is solved