Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * INFO IMEI
- * Author : Gienetic
- * Base : https://play.google.com/store/apps/details?id=com.gsmcenter.imeiinfo
- * Note : -
- */
- const axios = require("axios");
- const KEYS = "f43f0d0c-27b0-408a-abd0-585fabea6adf";
- async function cekImei(imei, opts = {}) {
- if (!imei) throw new Error("imei required");
- const timeoutMs = opts.timeoutMs || 10000;
- const url = `https://dash.imei.info/api/check/0/?imei=${encodeURIComponent(
- imei
- )}&API_KEY=${encodeURIComponent(KEYS)}`;
- const res = await axios.get(url, {
- headers: {
- Accept: "application/json, text/plain, */*",
- "User-Agent": "Gienetic/1.0.1",
- },
- timeout: timeoutMs,
- });
- if (res.status !== 200) {
- throw new Error(`Unexpected status ${res.status}`);
- }
- return res.data;
- }
- module.exports = cekImei
Advertisement
Add Comment
Please, Sign In to add comment