
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@occtoo/destination-client
Advanced tools
<source media="(prefers-color-scheme: dark)" srcset="https://6519008.fs1.hubspotusercontent-na1.net/hub/6519008/hubfs/Logo-Occtoo-white.png?width=200&height=80&name=Logo-Occtoo-white.png"> <img src="https://www.occtoo.co
Generate a fully typed client library for Occtoo Destination APIs.
Get started by running npm install @occtoo/destination-client
Occtoo is an Experience Data Platform designed to accelerate the way companies create meaningful customer experiences across various touchpoints. Our platform is tailored to assist digital officers, marketers, and developers in transitioning to a new paradigm where they can dedicate less time to data integration and more time to unleashing their creative potential with data.
An Occtoo Destination offers one or more endpoints that allow you to query specific subsets of your data. It also encompasses facets and various mechanisms for fine-tuning queries by leveraging them.
For more in-depth information about how to query a destination, please refer to the destination docs.
First, put your Occtoo destination values in a .env
file:
OCCTOO_DESTINATION_ID=...
OCCTOO_DESTINATION_URL=...
Install the package:
npm install @occtoo/destination-client
Then, import the DestinationClient
class to create a new destination client and use it to query your destination endpoints:
import { DestinationClient } from "@occtoo/destination-client";
import Image from "next/image";
const getProducts = async () => {
// create a new destination client
const destination = new DestinationClient({
credentials: {
clientId: "...",
clientSecret: "...",
},
});
// fetch access token if using a protected destination
await destination.authenticate();
// fetch data from destination
const destinationResponse = await destination.post("/product", {
top: 10,
filter: [
{
must: {
lineKey: ["WATCH"],
collectionKey: ["CARWMFTANK"],
},
},
],
sortAsc: ["id"],
});
return destinationResponse;
};
export default async function DestinationProducts() {
const products = await getProducts();
return (
<div className="container flex flex-row flex-wrap">
{products.results?.map((product) => (
<div
key={product.id}
className="flex flex-col items-center justify-center w-[200px] shrink-0 h-[250px] border"
>
<div className="flex items-center justify-center h-full">
{product.images?.length && (
<Image
src={product.images?.find((i) => i.url)?.url + "?format=small"}
alt={product.id || "product"}
height={50}
width={50}
/>
)}
</div>
<div className="mt-auto py-4 font-medium text-sm">{product.name}</div>
</div>
))}
</div>
);
}
If you are using a protected destination, you can pass client credentials to the DestinationClient
.
Credentials can be generated in the Occtoo Studio.
const destination = new DestinationClient({
credentials: {
clientId: "...",
clientSecret: "...",
},
});
Then call the authenticate
method to authenticate the client:
await destination.authenticate();
Note: Authentication is only permitted server-side. Tokens and credentials should be stored securely and not exposed to unauthorized clients.
If you are calling a protected destination client-side, you can pass an access token directly to the client:
const destination = new DestinationClient({
headers: {
Authorization: "Bearer ...",
}
});
If you are using an unprotected (public) destination, you can skip these steps.
npx @occtoo/destination-client --generate
FAQs
<source media="(prefers-color-scheme: dark)" srcset="https://6519008.fs1.hubspotusercontent-na1.net/hub/6519008/hubfs/Logo-Occtoo-white.png?width=200&height=80&name=Logo-Occtoo-white.png"> <img src="https://www.occtoo.co
The npm package @occtoo/destination-client receives a total of 69 weekly downloads. As such, @occtoo/destination-client popularity was classified as not popular.
We found that @occtoo/destination-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.