I am able to successfully create a challenge, but I can’t seem to be able to submit a move using the API. Been trying lots of different things, this is what I believe is my current best attempt. Could someone tell me what I’m missing? I’m not sure about the url and/or data being sent. Thanks a bunch! I know that the game id, move str, and player id are all valid.
def submit_move_to_game(s,access_token,player_id,game_id,move):
# Even though this is what documentation says, it doesn't work
#url = 'http://online-go.com/v1/games/'+str(game_id)+'/'+str(move)+'/'
url = 'https://online-go.com/api/v1/games/'+str(game_id)+'/'+str(move)+'/'
r = s.post(url,
headers = {
'Authorization': 'Bearer {}'.format(access_token),
},
json = {
'game_id': game_id,
'player_id': player_id,
'move': move,
},
allow_redirects = False,
);
Right now this is what I get back: {“detail”: “Method ‘POST’ not allowed.”}