API is returning text/html

Greetings!, I tried different things on “rest api” like getting the list of challenges, game and etc

I also tried different api like, https:// online-go .com/v1/games/, https ://online-go.com/termination-api/challenges/ and etc

I also included authorization bearer that I got from oauth

But unfortunately its always returning text/html instead of json, something like this

<!doctype html>Play Go at online-go.com! | OGS<meta name=“viewport” content="width=device-width,initial-scale=1

thanks in advance!

Where did you get those URLs from?

A couple things I notice:

1 Like

Thank you for your help!

I got them from API For Online Go (OGS) · Apiary

I just tried /api/v1/ and it fixed many things like /players tysm!

how about just the list of custom_games, is there a way to get them?
(Couldn’t find any reference in the documentation)

Makes sense. Those docs are pretty outdated. My usual strategy is this:

  1. Find the info I want in the UI
  2. Use the Network Tab in developer tools to inspect the api calls were made

Is this custom challenges (haven’t started) or active games (ongoing)? You may have to interface with the websocket for either.

  • gamelist/query for ongoing games
  • seek_graph for unstarted custom public challenges

Thank you so much for your help!

your advice on using the “network tab” is a game changer, and I can now see all available features.

1 Like

If you’re using the api/v1 you can add a query parameter like ?format=json to it, or &format=json, but yeah maybe that’s useful to someone else.