const thx = new THXIdentityClient({
clientId: '<CREATE_IN_DASHBOARD>',
clientSecret: '<CREATE_IN_DASHBOARD>',
});
// Authenticate a specific user using his identity code
thx.setIdentity('e7f32a71-33ea-418e-9d80-32b6bf6405f0');
// List available daily quests for your campaign
// and get the ID of the first quest
const { daily } = await thx.quests.list();
const questId = daily[0].id;
await thx.quests.daily.entry.create(questId);
// Get campaign participation info for authenticated user
// and show point balance
const { balance } = await thx.request.get('/v1/participants');
// Balance: 10 points