{
taskId: string; // The task's unique identifier
}
{
taskId: string;
taskData: {
'0': string;
'1': {
gameId: string;
plyrIds?: string[];
roomId?: string;
expiresIn?: number; // in seconds and only for createGameRoom
};
result?: {
gameId: string;
roomId: string;
roomAddress: string;
};
};
status: 'SUCCESS' | 'PENDING' | 'FAILED' | 'TIMEOUT';
hash: string;
errorMessage?: string;
completedAt: string;
}
// Setup request parameters
const timestamp = Date.now().toString();
const taskId = 'task_abc123xyz789';
// Generate HMAC signature (empty body for GET request)
const hmac = generateHmacSignature(timestamp, {}, secretKey);
// Make the API request
const response = await axios.get(apiEndpoint + '/task/status/' + taskId, {
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});