
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
linksquared
Advanced tools
Linksquared generates dynamic links, tracks attributions, and analyzes referrals, seamlessly directing users to your app or the app store for downloads.
The Linksquared SDK is a JavaScript module designed to integrate with the Linksquared API, providing functionality for creating and managing links, handling user information, and managing authentication. This documentation covers the main methods and usage of the SDK.
To install the Linksquared SDK, use the following command to add it as a dependency to your project:
npm install linksquared --save
This will add the Linksquared SDK to your dependencies in package.json.
After installation, you can include the SDK in your project:
import Linksquared from "linksquared";
constructor(APIKey, linkHandlingCallback);
Creates a new instance of the Linksquared SDK.
const APIKey = "your-api-key-here";
const handleLinkData = (data) => {
console.log("Link data received:", data);
};
const linksquared = new Linksquared(APIKey, handleLinkData);
Initializes and starts the Linksquared SDK by authenticating with the provided API key.
linksquared.start();
Creates a new link using the Linksquared API.
const linkData = {
description: "This is a sample link",
category: "Demo",
};
linksquared.createLink(
"Sample Link",
"This is a subtitle",
"https://example.com/image.jpg",
linkData,
(response) => {
console.log("Link created successfully:", response);
},
(err) => {
console.error("Error creating link:", err);
}
);
Retrieves the current user identifier.
const userId = linksquared.userIdentifier();
console.log("Current user ID:", userId);
Retrieves the current user attributes.
const userAttributes = linksquared.userAttributes();
console.log("User attributes:", userAttributes);
Sets the user identifier.
linksquared.setUserIdentifier("user-12345");
Sets the user attributes.
const attributes = {
name: "John Doe",
email: "john.doe@example.com",
};
linksquared.setUserAttributes(attributes);
Checks if the SDK is currently authenticated.
const isAuthenticated = linksquared.authenticated();
console.log("Is authenticated:", isAuthenticated);
Displays the messages list using the manager.
linksquared.showMessagesList();
Retrieves messages for a specific page using the manager.
linksquared.getMessages(
1,
(messages) => {
console.log("Retrieved messages:", messages);
},
(err) => {
console.error("Error retrieving messages:", err);
}
);
Retrieves the number of unread messages using the manager.
linksquared.getNumberOfUnreadMessages(
(count) => {
console.log("Number of unread messages:", count);
},
(err) => {
console.error("Error retrieving unread messages count:", err);
}
);
import Linksquared from "linksquared";
const APIKey = "your-api-key";
const linksquared = new Linksquared(APIKey, (data) => {
console.log("Link data:", data);
});
linksquared.start();
if (linksquared.authenticated()) {
linksquared.createLink(
"Sample Link",
"Subtitle",
"https://example.com/image.jpg",
{ foo: "bar" },
(response) => console.log("Link created:", response),
(error) => console.error("Error:", error)
);
}
linksquared.setUserIdentifier("user-123");
linksquared.setUserAttributes({ name: "John Doe", age: 30 });
console.log("User ID:", linksquared.userIdentifier());
console.log("User Attributes:", linksquared.userAttributes());
FAQs
Linksquared generates dynamic links, tracks attributions, and analyzes referrals, seamlessly directing users to your app or the app store for downloads.
The npm package linksquared receives a total of 7 weekly downloads. As such, linksquared popularity was classified as not popular.
We found that linksquared demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.