utilityjavascript16948
Netflix Direct 1-Click Login Link & Token Generator
Menghasilkan link login instan 1-klik (loginUrl) dan token nftoken Netflix tanpa ribet. Mendukung mode Auto-Pool (tanpa butuh cookie) maupun Custom Cookie via Falcor API.
Vamz Spectre16 Okt 2026188 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/nflix-generator" -o nflix-generator.js
# 2. Jalankan script
node nflix-generator.js
Dependencies npm yang Dibutuhkan:
npm install none (native fetch)Panduan Penggunaan:
node nflix-generator.js [--link] ["NetflixId=...; SecureNetflixId=..."]
nflix-generator.js(188 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/**
* Netflix Direct Token & 1-Click Login Link Generator
* Author: Vamz Spectre / VamxAPI
*
* Mengambil token 1-klik sign-in (nftoken) dan langsung menghasilkan Link Auto-Login Netflix.
* Mendukung 2 mode:
* 1. Custom Cookie: Generate via Netflix Falcor pathEvaluator resmi
* 2. Auto Pool (tanpa cookie): Generate token akun aktif otomatis dari pool publik
*
* Install / Download:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/nflix-generator" -o nflix-generator.js
*
* Usage:
* - Auto Generate: node nflix-generator.js
* - Custom Cookie: node nflix-generator.js "NetflixId=...; SecureNetflixId=..."
* - Hanya Link : node nflix-generator.js --link
*/
/**
* Ekstrak authURL (CSRF token) dan BUILD_IDENTIFIER dari halaman Netflix
* @param {string} cookieHeader - String cookie yang berisi NetflixId & SecureNetflixId
* @returns {Promise<{ authURL: string, buildId: string }>}
*/
async function getNetflixContext(cookieHeader) {
const res = await fetch("https://www.netflix.com/youraccount", {
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Cookie": cookieHeader
}
});
const html = await res.text();
const authMatch = html.match(/"authURL"\s*:\s*"([^"]+)"/);
const buildMatch = html.match(/"BUILD_IDENTIFIER"\s*:\s*"([^"]+)"/);
if (!authMatch) {
throw new Error("Gagal mengambil authURL. Pastikan cookie Netflix valid dan masih aktif.");
}
return {
authURL: authMatch[1],
buildId: buildMatch ? buildMatch[1] : "vdb445da1"
};
}
/**
* Generate nftoken langsung ke Netflix Falcor pathEvaluator
* @param {string} cookieHeader - Cookie akun aktif (NetflixId & SecureNetflixId)
* @returns {Promise<object>} Detail token dan link siap pakai
*/
async function generateFromCookie(cookieHeader) {
if (!cookieHeader || !cookieHeader.includes("NetflixId=")) {
throw new Error("Cookie tidak valid! Wajib menyertakan NetflixId dan SecureNetflixId.");
}
const { authURL, buildId } = await getNetflixContext(cookieHeader);
const falcorUrl = `https://www.netflix.com/api/shakti/${buildId}/pathEvaluator`;
const payload = {
paths: [["account", "token", "default"]],
authURL: authURL
};
const res = await fetch(falcorUrl, {
method: "POST",
headers: {
"Content-Type": "application/json",
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Referer": "https://www.netflix.com/youraccount",
"Cookie": cookieHeader
},
body: JSON.stringify(payload)
});
const data = await res.json();
const token =
data?.jsonGraph?.account?.token?.default?.value ||
data?.value?.account?.token?.default?.value;
if (!token) {
throw new Error("Token tidak ditemukan di respon Falcor. Kemungkinan cookie sudah kadaluarsa.");
}
const loginUrl = `https://netflix.com/?nftoken=${token}`;
const loginApp = `https://netflix.com/unsupported?nftoken=${token}`;
const loginTv = `https://netflix.com/tv2?nftoken=${token}`;
return {
success: true,
loginUrl,
loginApp,
loginTv,
token,
mode: "custom",
links: {
direct: loginUrl,
pc: `https://www.netflix.com/browse?nftoken=${token}`,
android: `intent://www.netflix.com/?nftoken=${token}#Intent;scheme=https;package=com.netflix.mediaclient;end`,
app: loginApp,
tv: loginTv
},
meta: {
buildId,
generatedAt: new Date().toISOString()
}
};
}
/**
* Generate nftoken otomatis dari pool publik
*/
async function generateFromPool() {
const res = await fetch("https://nftoken.zone.id/api/auto-generate", {
method: "GET",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
}
});
const data = await res.json();
if (data?.success && data?.token) {
const token = data.token;
const loginUrl = data.links?.pc || `https://netflix.com/?nftoken=${token}`;
const loginApp = data.links?.android || `https://netflix.com/unsupported?nftoken=${token}`;
const loginTv = data.links?.tv || `https://netflix.com/tv2?nftoken=${token}`;
return {
success: true,
loginUrl,
loginApp,
loginTv,
token,
mode: "auto",
expiry: data.expiry || undefined,
links: {
direct: loginUrl,
pc: loginUrl,
android: loginApp,
tv: loginTv
},
meta: {
generatedAt: new Date().toISOString()
}
};
}
throw new Error(data?.message || "Gagal mengambil token otomatis dari pool publik.");
}
/**
* Main resolver fungsi
*/
async function generateNetflixToken(cookieHeader) {
const trimmed = cookieHeader?.trim();
if (trimmed && trimmed.includes("NetflixId=")) {
return await generateFromCookie(trimmed);
}
return await generateFromPool();
}
module.exports = { generateNetflixToken, generateFromCookie, generateFromPool, getNetflixContext };
// CLI Runner
if (require.main === module) {
const args = process.argv.slice(2);
const isRaw = args.includes("--link") || args.includes("--raw") || args.includes("--url");
const cookieArg = args.find((a) => !a.startsWith("--"));
(async () => {
try {
const result = await generateNetflixToken(cookieArg);
if (isRaw) {
console.log(result.loginUrl);
} else {
console.log(JSON.stringify(result, null, 2));
}
} catch (err) {
console.error(JSON.stringify({ success: false, error: err.message }, null, 2));
process.exit(1);
}
})();
}