authToken
authToken
(string
): A string that can be sent to our servers to retrieve the original object in order to thwart potential tampering.
Verification Endpoint
The authToken
provided in the fingerprint object can be used to verify the data with OverpoweredJS servers.
Request
To verify the authToken
, make a GET request to the following endpoint:
GET https://api.ovpjs.com/verify/{authToken}
Replace {authToken}
with the actual token.
Example:
GET https://api.ovpjs.com/verify/117756340268441600
Response
If the token is valid and has not expired (tokens are valid for five minutes after the opjs()
function resolves), the server responds with HTTP status code 200 OK
and returns the original fingerprint object, excluding the authToken
.
Example Response:
{
"clusterUUID": "AB-CDE-FGH-IJK",
"uniquenessScore": 5,
"botScore": 1,
"browserTraits": {
"isIncognito": false,
"hasCanvasNoise": false,
"possibleCountryCodes": ["US"]
},
"hash": "484f9fd6ac89ab21042fd7540bbbe95e6453433ae0111b945d86b6d0ed98e616"
}
If the token is invalid or has expired, the server responds with HTTP status code 404 Not Found
.
Server-Side Verification Example
Here's how you might verify the authToken
on your server using Node.js and the fetch
API:
const authToken = '117756340268441600';
fetch(`https://api.ovpjs.com/verify/${authToken}`)
.then(response => {
if (response.status === 200) {
return response.json();
} else {
throw new Error('Invalid or expired authToken');
}
})
.then(fingerprint => {
console.log('Verified Fingerprint:', fingerprint);
// Proceed with processing the fingerprint data
})
.catch(error => {
console.error('Verification Error:', error);
});