VerifyClaimingCode

Verify Claiming Code endpoint documentation

Endpoint: /instantPlayPass/verify/claimingCode/{claimingCode} Method: GET

{
    claimingCode: string; // The claiming code to verify
}

Example Usage

const timestamp = Date.now().toString();
const claimingCode = 'ABC123XYZ'; // The claiming code to verify

// Since this is a GET request with no body, pass null as the body for HMAC
const hmac = generateHmacSignature(timestamp, null, secretKey);

const response = await axios.get(apiEndpoint + `/instantPlayPass/verify/claimingCode/${claimingCode}`, {
    headers: {
        apikey: apiKey,
        signature: hmac,
        timestamp: timestamp
    }
});

// Check the validity and status of the claiming code
const { valid, status } = response.data;

if (valid) {
    console.log('Claiming code is valid');
    console.log('Status:', status);
    // Proceed with the claiming process
} else {
    console.log('Claiming code is invalid or expired');
    // Handle invalid code (e.g., ask user to try again)
}

Claiming codes can only be used once.

Last updated