Mengecek Apakah Imei Valid
1/**
2 * INFO IMEI
3 * Author : Gienetic
4 * Base : https://play.google.com/store/apps/details?id=com.gsmcenter.imeiinfo
5 * Note : -
6 */
7
8
9const axios = require("axios");
10
11const KEYS = "f43f0d0c-27b0-408a-abd0-585fabea6adf";
12
13async function cekImei(imei, opts = {}) {
14 if (!imei) throw new Error("imei required");
15
16 const timeoutMs = opts.timeoutMs || 10000;
17 const url = `https://dash.imei.info/api/check/0/?imei=${encodeURIComponent(
18 imei
19 )}&API_KEY=${encodeURIComponent(KEYS)}`;
20
21 const res = await axios.get(url, {
22 headers: {
23 Accept: "application/json, text/plain, */*",
24 "User-Agent": "Gienetic/1.0.1",
25 },
26 timeout: timeoutMs,
27 });
28
29 if (res.status !== 200) {
30 throw new Error(`Unexpected status ${res.status}`);
31 }
32
33 return res.data;
34}
35
36module.exports = cekImeiNo comments yet. Be the first to comment!