
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
light-spotify
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
High CVE
light-spotify is a Spotify wrapper to make it easy to work with Spotify's API.
For npm:
npm i light-spotify
For yarn:
yarn add light-spotify
Its important to make sure that you have a valid access token to make requests. To make an access token, you can use the simple code below.
const baseUrl = "https://accounts.spotify.com/api/token";
const getData = await fetch(baseUrl, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Authorization:
"Basic " +
new Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString("base64"),
},
body: "grant_type=client_credentials",
})
.then(res => res.json())
.then(data => {
console.log(data)
/*{
access_token: 'GENERATED ACCESS TOKEN',
token_type: 'Bearer',
expires_in: 3600
}*/.
})
Then, create a new instance of the package.
import { LightSpotify } from 'light-spotify';
const SpotifyAPI = new LightSpotify();
//set access token here.
SpotifyAPI.setAccessToken = 'ACCESS_TOKEN';
//if you ever need to get the access token.
console.log(Spotify.getAccessToken); //returns the token.
Making requests with light-spotify is easy. Want to get multiple albums? Easy.
const { LightSpotify } = require("light-spotify");
const spotify = new LightSpotify();
const albumIds = ['ID1', 'ID2', 'ID3']; // max 20 ids;
//set the access token first.
spotify.setAccessToken = 'asd'; // get the auth token;
//param 1: token || param 2: the album id or album ids || param 3: the market (valid ISO 3161 code).
spotify
.getMultipleAlbums(spotify.getAccessToken, albumIds, 'US') // returns Promise of AxiosResponse
//Handle the resolved promise.
.then((i) => {
console.log(i.data);
})
//handle errors
.catch(console.error);
Oh yeah. And we also have full Typescript support. :)
Check out /docs/TOC.md for all data requests that you can make.
Any contributions are welcome. Check out CONTRIBUTING.md for more info.
FAQs
A Spotify wrapper that makes it easy to work with Spotify's api.
The npm package light-spotify receives a total of 0 weekly downloads. As such, light-spotify popularity was classified as not popular.
We found that light-spotify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.