Creating Test Players
In order to test your setup when developing and debugging, you can create a test user and override your client application to use it directly. You can create test players in the Subroutine dashboard.
Head over to the game overview of a dashboard and click Players
in the top-right corner. The following view will show you a general overview of your Player base.
At the top of the page, hit "Create Test Player"
The textarea will show up with a bearer JWT token for your test player. You can override the client you are using to use this player instead. In the case of GraphQL client (such as Apollo client, or others), you only have to make sure that the token is passed through an Authorization header as a bearer token.
- Unity
- GraphQL
void Awake()
{
Client = new Subroutine.API.Client(
new SubroutineClient.API.ClientOptions
{
CoroutineRunner = this,
ApiToken = "<your game API token>",
TestUserAuthToken = "<bearer token for the test user>"
}
);
}
{
"Authorization": "Bearer ${token}"
}