Hello, trying to piece together the correct API authentication flow based on various different and seemingly outdated API documentations, as well as some posts on this forum, but getting stuck with an invalid_client response from the endpoint.
Doing a POST request to https://beta.online-go.com/oauth2/token/
Providing x-www-form-urlencoded variables client_id, client_secret, username, password and grant_type with value password
Triple checked all input and stored as local variables in Postman
Result: {"error": "invalid_client"}
No further details, but I’m assuming it doesn’t like the client ID or client secret. Are there any other steps that need to be taken? Do the applications need to be approved/validated first on OGS’s end?
Looks like firstly, the application that is registered need to be of the resource owner password grant type. And secondly, you need to copy the client secret that is generated on the first page before the app is saved and use that. As the client secret that is displayed later on is a hash of the client secret, and should not be used. So you only get one chance to copy the client secret.
I wish all of this was documented somewhere properly.