
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
musically-api
Advanced tools
A reverse-engineered implementation of the musical.ly app's API.
npm i musically-api
import MusicallyAPI, { getRequestParams } from 'musically-api';
// Required - a method that signs the URL with anti-spam parameters
// You must provide an implementation yourself to successfully make
// most requests with this library.
const signURL = async (url, ts, deviceId) => {
const as = 'anti-spam parameter 1';
const cp = 'anti-spam parameter 2'
const mas = 'anti-spam parameter 3';
return `${url}&as=${as}&cp=${cp}&mas=${mas}`;
}
// Required - device parameters
// You need to source these using a man-in-the-middle proxy such as mitmproxy,
// CharlesProxy or PacketCapture (Android)
const params = getRequestParams({
device_id: '<device_id>',
fp: '<device_fingerprint>',
iid: '<install_id>',
openudid: '<device_open_udid>',
});
const api = new MusicallyAPI(params, { signURL });
// You are now able to make successful requests
Authenticates you with the API and stores your session data in a cookie jar. Subsequent requests will include these cookies.
api.loginWithEmail('<email>', '<password>')
.then(res => console.log(res.data))
.catch(console.log)
// Outputs:
// { email: '<email>', session_key: '123456', user_id: '123456', ... }
See the login types for the response data.
Gets a user's profile.
api.getUser('<user_id>')
.then(res => console.log(res.data.user))
.catch(console.log);
// Outputs:
// { aweme_count: 1000, nickname: 'example', unique_id: 'musername', ... }
See the user types for the response data.
Lists a user's posts.
api.listPosts({
user_id: '<user_id>',
max_cursor: 0,
})
.then(res => console.log(res.data.aweme_list))
.catch(console.log);
// Outputs:
// [{ author: {...}, aweme_id: '999', desc: 'description', music: {...}, statistics: {...}, video: {...} }, ...]
See the post types for the complete request/response objects.
Lists the users that follow the specified user.
api.listFollowers({
user_id: '<user_id>',
max_time: Math.floor(new Date().getTime() / 1000),
})
.then(res => console.log(res.data.followers))
.catch(console.log);
// Outputs:
// [{ unique_id: 'follower1' }, { unique_id: 'follower2' }, ...]
See the follower types for the complete request/response objects.
This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by musical.ly or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk.
FAQs
Unofficial API wrapper for musical.ly
The npm package musically-api receives a total of 14 weekly downloads. As such, musically-api popularity was classified as not popular.
We found that musically-api 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.