MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / getUidFromUsername

Function getUidFromUsername

scripts/insta_GLOBAL.js:74–80  ·  view source on GitHub ↗
(username)

Source from the content-addressed store, hash-verified

72 return json;
73}
74export async function getUidFromUsername(username) {
75 let json = await getInstaUserInfo(username);
76 console.log(json);
77 let firstUser = json?.users[0]?.user || {};
78 if (firstUser.username != username) return null;
79 return firstUser.pk;
80}
81export function getCrftoken() {
82 try {
83 return document.cookie

Calls 1

getInstaUserInfoFunction · 0.85

Tested by

no test coverage detected