In this article we are going to show you how to change WebGL Metadata during the creation of your virtual browser profile through the Local API Clients.
Concept
During the CreateProfileRequest
POST /profiles/new
You can pass the CreateProfileRequest object that has a WebglMetaSpoofingType property. This can be used to set up WebGL Metadata. Possible values are:
- Automatic: The vendor and renderer values comes from the fingerprint.
- Manual: Manually set the vendor and renderer values. In this case the unmasked vendor and unmasked renderer must be passed in the WebglMetaSpoofingOptions object
- Off: Turn off the spoofing, use the original settings
We suggest you to use the "Automatic" setting that is included in the set recommended defaults call. To set the WebGL Metadata type, use the WebglMeta
method in the Local API Clients. Below you can find the examples for Javascript and Python:
Examples
-
@type {import('@kameleo/local-api-client').CreateProfileRequest} */ const createProfileRequest = { fingerprintId: fingerprints[0].id, webglMeta: { value: 'manual', extra: { vendor: 'Google Inc. (AMD)', renderer: 'ANGLE (AMD Radeon (TM) RX 560 Direct3D11 vs_5_0)', }, }, }; const profile = await client.profile.createProfile(createProfileRequest);
-
from kameleo.local_api_client.models import CreateProfileRequest, WebglMetaSpoofingChoice, WebglMetaSpoofingOptions create_profile_request = CreateProfileRequest( fingerprint_id=fingerprints[0].id, webgl_meta=WebglMetaSpoofingChoice( value='manual', extra=WebglMetaSpoofingOptions( vendor='Google Inc. (AMD)', renderer='ANGLE (AMD Radeon (TM) RX 560 Direct3D11 vs_5_0)' ) ) ) profile = client.profile.create_profile(create_profile_request)