I’m trying to get oauth2 token , however, I always get {"error": "invalid_client".}
response. Am I missing anything here?
Here is my request:
curl -X POST -d 'grant_type=password&username={username}&password={password}&client_id={client_id_on_application_page}&client_secret={client_secret_on_application_page}' https://online-go.com/oauth2/token/
AdamR
September 15, 2021, 10:33am
2
I can’t help directly, but check these out:
Tested and works for me on beta and prod, so go here first to register a client:
as an example I chose client type public and grant type password
After you’ve done that, you’ll want to make sure the account you want to login as has a password set, here’s a curl example:
curl -X POST -d 'grant_type=password&username=matburt&password=notmypass&client_id=clientidgivenonthatpage&client_secret=clientsecretgivenonthatpage' https://online-go.com/oauth2/token/
Alternatively you can do this:
curl …
I have been trying to use the /oauth2/token endpoint in order to refresh my access tokens, but have been having a hard time figuring out what the expected form data is. I’ve been sending grant_type as "refresh_token" along with the other keys being refresh_token, client_id, and client_secret initialized to strings containing the corresponding values from my application and initial oauth authentication. However, I am receiving an invalid grant error.
Does anyone know what is expected in order to…
fmansa
September 15, 2021, 4:20pm
3
I was able to get a token recently by reading old posts on the forum and on the github. It worked for me. Please someone tell me if I am doing something wrong.
get a client id/secret here:
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
use the password set here:
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
Radnor
September 21, 2021, 9:48pm
4
I see that one of my questions was linked as an answer here, so I figured that I would link to the code I wrote that works for your reference https://github.com/dylanross620/Rengo-Bot/blob/main/api/rest.py#L10
system
Closed
December 22, 2021, 5:48am
5
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.