I am struggling to find the code example for basic auth using only REST API with out any SDK.
I am trying with "https://auth.gamesparks.net/restv2/auth/user" and sending "userName" and "password" as a JSON params. But it never works on my side.
While testing on "Test Harness" it works.
Any pointer to the right direction would help.
That endpoint is utilized for the retrieval of a JWT Token. This is to auth the GameSparks account for access to the config, as opposed to granting access to a player.
You can use the Requests API to make authentication calls, however, it's important to realise that since we're using the REST API, there won't be any connection after authentication. You'll have to send the auth-token alongside the other parameters in any subsequent request.
How would one use the authentication token in the Requests API? Is it the 'secret' in the request blueprint in the docs?
One other use case for this, is when backgrounding the app on iOS it doesn't seem possible to send a request with the Unity SDK since it uses web sockets. Updating the latest info when backgrounding is useful for analytics purposes.
Exactly @Baris Tumerkan I could not make out what to do and how to do. So jumped to another provider just for the sake of docs.
Though the offering here seems a lot, but the problem is documentation.
I am hoping for a clean doc or step by step guide for a noob.
For the answer to my question, adding "authToken" and "playerId" in the request body works (with the credential being set to "player", and the Rest API policy set to "Allowed with authentication token" in the configurator).