online-go / online-go.com

Source code for the Online-Go.com web interface
https://online-go.com/
GNU Affero General Public License v3.0
1.22k stars 344 forks source link

cant get http://online-go.com/oauth2/access_token #2500

Open travisbikkle opened 7 months ago

travisbikkle commented 7 months ago

Describe the bug I followed

  1. create oauth application : https://online-go.com/oauth2/applications/

    image
  2. post to http://online-go.com/oauth2/access_token with client_id, client_secret, grant_type, username, password

    image

    https://ogs.docs.apiary.io/#

    I got

    image

What I'm trying to do I'm trying to making a game, user could login in with their ogs account to watch games or play with others. My understanding is, I need to

  1. create an oauth application, got my client_id and client_secret
  2. let player fill in the username and password
  3. post client_id, client_secret, player's username and password to http://online-go.com/oauth2/access_token to get a access_token
  4. with this access_token, access realtime api like http://online-go.com/game/connect (where do i get the user_id btw) or other rest api like http://online-go.com/games to list games

is that right? or i misunderstood something? cause i've been tyring to figure this out all day and failed, a little frustrating. could anyone help? thanks!

travisbikkle commented 7 months ago

Any reply will be appreciated, please!