import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const response = await client.users.createDevice({ ipAddress: '123.456.789.012' });
console.log(response.id);
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"websiteId": "123e4567-e89b-12d3-a456-426614174001",
"organizationId": "123e4567-e89b-12d3-a456-426614174002",
"ipAddress": "123.456.789.012",
"deviceIdentifier": "<string>",
"source": "<string>",
"createdAt": "2023-10-01T12:34:56Z"
}
This endpoint is used to create user devices for fraud tracking
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const response = await client.users.createDevice({ ipAddress: '123.456.789.012' });
console.log(response.id);
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"websiteId": "123e4567-e89b-12d3-a456-426614174001",
"organizationId": "123e4567-e89b-12d3-a456-426614174002",
"ipAddress": "123.456.789.012",
"deviceIdentifier": "<string>",
"source": "<string>",
"createdAt": "2023-10-01T12:34:56Z"
}
Body
Schema for a create user device schema
200
Schema for a user device
Was this page helpful?