Recent Posts (Do not edit)

middle ad

Bangla Music Videos

[Bangla Muvic Video][pvid]

Latest Music

[Music][pvid]

Movie Trailer

[Trailer][pvid]

Tamil Movies

[Tamil Movies][pvid]

Bangla Music

[Bangla Muvic Video][pvid]

Punjabi Music

[Punjabi][pvid]
$ curl -H 'X-API-Key:YOUR_API_KEY' \ -F 'image_file=@/path/to/file.jpg' \ -f https://api.designify.com/v1.0/designify/fa40dc38-f3c4-4a3a-b8c2-0b1d08c05faf -o design.png
f

f

$ curl -H 'X-API-Key:YOUR_API_KEY' \ -F 'image_file=@/path/to/file.jpg' \ -f https://api.designify.com/v1.0/designify/fa40dc38-f3c4-4a3a-b8c2-0b1d08c05faf -o design.png
!DOCTYPE NETSCAPE-Bookmark-file-1> Bookmarks

Bookmarks

Bookmarks bar

Star-Clicks.com - Sign In
myAadhaar - Unique Identification Authority of India | Government of India
CoWIN Application
qr (1).pdf
New Registration | Kendriya Vidyalaya Sangthan
WHATSAPP VIDEOS - KANPUR - Google Drive
Asclepius Wellness Private Limited
रजिस्ट्रार, फर्म्स सोसाइटीज एवं चिट्स उ0प्र0
Union Bank of India
राज्य कृषि उत्पादन मण्डी परिषद्, उत्तर प्रदेश
Pay Fees -S.N. Sen B.V. Post Graduate College
https://smepaisa.bankofbaroda.co.in/BOBBRM/Login.aspx
OBC_lottery_post_shuffle.pdf
Integrated Pension Yojna,Govt. Of Uttar Pradesh
HDking.one – Pc 720p 480p Movies Download Jalshamoviez, 720p Bollywood Movies Download Jalshamoviez Org,1Jalshamoviez, JalshamoviezHD in 720p Hollywood Hindi Dubbed Movies Download JalshamoviezHD Com, 720p 480p South Indian Hindi Dubbed Movies Download Jalshamovies , Hollywood Bollywood Hollywood Hindi 720p Movies Download Jalshamoviez In , Bollywood 720p Pc Movies Download, HdKing
Honeygain Dashboard – All Your Sharing Information at Hand
VideoVard Dashboard
Create an Account
Payout Rates
Register
Download Rangili Ragini (2022) Season (01) All Episodes Full HD Links | BonsaiHD.com
Files.im - Free file upload service
LustestHD
Publisher Rates
Register - 13X4
VUP
MovierulzHD | Watch Movies Online Free Download Movierulz
Register - MySaveLinks
Register - Linkspop
Moviesdada | Movies dada Moviesdada.com Hindi Dubbed Movies
Nojoto - India's Largest Storytelling Platform
Unlimited File Sharing | Free File Sharing Platforms | Uploady.io - Earn Money by Sharing Files
Register
EPFO: Forgot Password
EPFO | Member Passbook & Claim Status
ICDS UP | Department | GoUP
ICDS UP Anganwadi Bharti 2022: 53000+ Supervisor, Worker, Helper- District Wise List
Food Portal : Error Page
Member Home
You searched for Dev dd - BetaMoviez | BetaMoviez.xyz
MoviesVerse | Movies Verse - 480p Movies, 720p Movies, 1080p Movies
Dev DD (Season1) Hindi Single Episodes 720p [200MB/E] – Sharing
Best Free File Secure Sharing Services - FilePress
File.tc - Free, Fast and Easy File Sharing - File Upload
SamajKalyan Parivarik Labh
SamajKalyan Parivarik Labh
PF Pension withdrawal Process online Form 10C | How to withdraw PF | EPS withdrawal - YouTube
[Official] Repairit: One Stop Solution to Fix Broken Files
[Wondershare] [Official] - Repairit Online Video Repair
Rationcard Digitization
TeamDrive Generator
MoviezDB.xyz - Dual Audio Hindi Dubbed HD Movies Download
Rationcard Digitization
Prmovies - Watch Free Movies and TV Shows Online « prmovies
10starhd | 10starhd movies 10starhd pro hindi dubbed 300mb
Mkvpapa | mkvpapa.com mkv papa mkvpapa hindi dubbed 300mb
MoviesLake - 300mb Movies, 480p Movies, 720p Movies, 1080p Movies, MKV Movies, Dual Audio Movies Download.
CORE VALUES | National Cadet Corps | India
WGX1449040 - Google Search
Moviesmon | Movies mon Moviemon 2022 Web series 300mb
Webonflix Direct Link Provider
Movie25 | TinklePad | 5movies - Watch Movies and TV Series Online for Free
Watch Don't Breathe 2 Movies Online - Movies7
FOU MOVIES - Download FOU MOVIES Free Online
HindMovie - Hind Movie - 720p Movies, 480p Movies, 300MB Movies, 700MB, 1080p Movies Google Drive Download Links
ExtraLinks - Multiple Link Protector & Earn Money

Imported From Firefox

toolbar

Getting Started

Mozilla Firefox

Help and Tutorials
Customize Firefox
Get Involved
About Us

Recent - Google Drive

SACHIN

New folder

Imported From IE

Links

Suggested Sites

fff

fff

!DOCTYPE NETSCAPE-Bookmark-file-1> Bookmarks

Bookmarks

Bookmarks bar

Star-Clicks.com - Sign In
myAadhaar - Unique Identification Authority of India | Government of India
CoWIN Application
qr (1).pdf
New Registration | Kendriya Vidyalaya Sangthan
WHATSAPP VIDEOS - KANPUR - Google Drive
Asclepius Wellness Private Limited
रजिस्ट्रार, फर्म्स सोसाइटीज एवं चिट्स उ0प्र0
Union Bank of India
राज्य कृषि उत्पादन मण्डी परिषद्, उत्तर प्रदेश
Pay Fees -S.N. Sen B.V. Post Graduate College
https://smepaisa.bankofbaroda.co.in/BOBBRM/Login.aspx
OBC_lottery_post_shuffle.pdf
Integrated Pension Yojna,Govt. Of Uttar Pradesh
HDking.one – Pc 720p 480p Movies Download Jalshamoviez, 720p Bollywood Movies Download Jalshamoviez Org,1Jalshamoviez, JalshamoviezHD in 720p Hollywood Hindi Dubbed Movies Download JalshamoviezHD Com, 720p 480p South Indian Hindi Dubbed Movies Download Jalshamovies , Hollywood Bollywood Hollywood Hindi 720p Movies Download Jalshamoviez In , Bollywood 720p Pc Movies Download, HdKing
Honeygain Dashboard – All Your Sharing Information at Hand
VideoVard Dashboard
Create an Account
Payout Rates
Register
Download Rangili Ragini (2022) Season (01) All Episodes Full HD Links | BonsaiHD.com
Files.im - Free file upload service
LustestHD
Publisher Rates
Register - 13X4
VUP
MovierulzHD | Watch Movies Online Free Download Movierulz
Register - MySaveLinks
Register - Linkspop
Moviesdada | Movies dada Moviesdada.com Hindi Dubbed Movies
Nojoto - India's Largest Storytelling Platform
Unlimited File Sharing | Free File Sharing Platforms | Uploady.io - Earn Money by Sharing Files
Register
EPFO: Forgot Password
EPFO | Member Passbook & Claim Status
ICDS UP | Department | GoUP
ICDS UP Anganwadi Bharti 2022: 53000+ Supervisor, Worker, Helper- District Wise List
Food Portal : Error Page
Member Home
You searched for Dev dd - BetaMoviez | BetaMoviez.xyz
MoviesVerse | Movies Verse - 480p Movies, 720p Movies, 1080p Movies
Dev DD (Season1) Hindi Single Episodes 720p [200MB/E] – Sharing
Best Free File Secure Sharing Services - FilePress
File.tc - Free, Fast and Easy File Sharing - File Upload
SamajKalyan Parivarik Labh
SamajKalyan Parivarik Labh
PF Pension withdrawal Process online Form 10C | How to withdraw PF | EPS withdrawal - YouTube
[Official] Repairit: One Stop Solution to Fix Broken Files
[Wondershare] [Official] - Repairit Online Video Repair
Rationcard Digitization
TeamDrive Generator
MoviezDB.xyz - Dual Audio Hindi Dubbed HD Movies Download
Rationcard Digitization
Prmovies - Watch Free Movies and TV Shows Online « prmovies
10starhd | 10starhd movies 10starhd pro hindi dubbed 300mb
Mkvpapa | mkvpapa.com mkv papa mkvpapa hindi dubbed 300mb
MoviesLake - 300mb Movies, 480p Movies, 720p Movies, 1080p Movies, MKV Movies, Dual Audio Movies Download.
CORE VALUES | National Cadet Corps | India
WGX1449040 - Google Search
Moviesmon | Movies mon Moviemon 2022 Web series 300mb
Webonflix Direct Link Provider
Movie25 | TinklePad | 5movies - Watch Movies and TV Series Online for Free
Watch Don't Breathe 2 Movies Online - Movies7
FOU MOVIES - Download FOU MOVIES Free Online
HindMovie - Hind Movie - 720p Movies, 480p Movies, 300MB Movies, 700MB, 1080p Movies Google Drive Download Links
ExtraLinks - Multiple Link Protector & Earn Money

Imported From Firefox

toolbar

Getting Started

Mozilla Firefox

Help and Tutorials
Customize Firefox
Get Involved
About Us

Recent - Google Drive

SACHIN

New folder

Imported From IE

Links

Suggested Sites

var authConfig = { version: "4.5", dailyLimit: true, // Whether to limit each mailbox to submit requests only once a day client_id: 'ClientID', // Google Client ID client_secret: 'ClientSecret', // Google Client Secret domain: "! ", black_list: ["email@gmail.com"] }; var gd; authConfig.domainCount = 4; //Remplace 4 by the number of different drives you have var today; // Create an account at https://dashboard.hcaptcha.com/signup and fulfill all details var hCaptchaConfig = { secret: ' ', sitekey: ' ' }; var html = ` TeamDrive Generator

Before using


This website is a free generator of shared drives.
But free doesn't mean that you can abuse!

What is considered as abuse?

- Creating tens of empty shared drives
- Storing Tb of data that you will never use
- Storing illegal stuff or porn

What are the possible consequences due to abuse?

- Google will put restrictions as they will do on EDU
- University and organizations can delete all team drives
- University and organizations will cancelled their subscription (worst case scenario)

Abusing this free service will lead to more google restrictions.

?

Google Logo

Create Google Shared Drives for FREE !

Operational : 150

Non Working : 0

Testing : 0

`; addEventListener("fetch", (event) => { event.respondWith(handleRequest(event.request)); }); var dailyLimit = []; /** * Fetch and log a request * @param {Request} request */ async function handleRequest(request) { if (authConfig.dailyLimit) { if (!today) today = new Date().getDate(); // Remove email rate limit every day if (new Date().getDate() != today) { today = new Date().getDate(); dailyLimit.length = 0; } } if (gd == undefined) { gd = new googleDrive(authConfig); } let url = new URL(request.url); let path = url.pathname; switch (path) { case "/teamDriveThemes": let teamDriveThemes = await gd.getTeamDriveThemes(); return new Response(JSON.stringify(teamDriveThemes), { status: 200, headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", }, }); case "/drive": if (request.method === "POST") { const requestBody = await request.json(); //验证码 if (requestBody.recaptcha.length == 0) { return new Response("You have to complete the captcha to get a shared drive.", { status: 400, }); }else{ //hCaptcha Verification let hc = new hCaptcha(hCaptchaConfig.secret, hCaptchaConfig.sitekey); let verificationResponse = await hc.verify(requestBody.recaptcha); if(!verificationResponse.success){ return new Response("Captcha verification: " + verificationResponse["error-codes"], { status: 400, }); } } //团盘多选 if (requestBody.channel ==0 ){ requestBody.channel = getRandomInteger(1,authConfig.domainCount); } //The client secret and the refresh token used here are the one set in the beginning of the file if (requestBody.channel == 1) { authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } if (requestBody.channel == 2) { authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } if (requestBody.channel == 3) { authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } // If you want to use a custom client id & secret : if (requestBody.channel == 4) { authConfig.client_id = "CLIENT ID"; authConfig.client_secret = "CLIENT SECRET"; authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } if (authConfig.dailyLimit) { if (dailyLimit.includes(requestBody.emailAddress)) { return new Response( "⏳ You have reached the maximum number of creations allowed today!", { status: 429, } ); } else { dailyLimit.push(requestBody.emailAddress); } } if (authConfig.black_list.includes(requestBody.emailAddress)) { return new Response("Please fill in all the fields", { status: 429, }); } try { let result = await gd.createAndShareTeamDrive(requestBody); return new Response( "✅ Your Shared Drive has successfully been created !", { status: 200, } ); } catch (err) { return new Response("Domain #" + requestBody.channel + " - " + err.toString(), { status: 500, }); } } else if (request.method === "OPTIONS") { return new Response("", { status: 200, headers: { "Access-Control-Allow-Origin": "*", }, }); } else { return new Response("Bad Request", { status: 400, }); } default: return new Response(html, { status: 200, headers: { "Content-Type": "text/html; charset=utf-8", "Access-Control-Allow-Origin": "*", }, }); } } // https://stackoverflow.com/a/2117523 function uuidv4() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { // tslint:disable-next-line:one-variable-per-declaration const r = (Math.random() * 16) | 0, // tslint:disable-next-line:triple-equals v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16); }); } class googleDrive { constructor(authConfig) { this.authConfig = authConfig; this.accessToken(); } async getTeamDriveThemes() { let url = "https://www.googleapis.com/drive/v3/about"; let requestOption = await this.requestOption(); let params = { fields: "teamDriveThemes" }; url += "?" + this.enQuery(params); let response = await fetch(url, requestOption); return await response.json(); } async createAndShareTeamDrive(requestBody) { // Create team drive console.log("Creating TeamDrive"); let url = "https://www.googleapis.com/drive/v3/drives"; let requestOption = await this.requestOption( { "Content-Type": "application/json" }, "POST" ); let params = { requestId: uuidv4() }; url += "?" + this.enQuery(params); let post_data = { name: requestBody.teamDriveName, }; if ( requestBody.teamDriveThemeId && requestBody.teamDriveThemeId !== "random" ) { post_data.themeId = requestBody.teamDriveThemeId; } requestOption.body = JSON.stringify(post_data); let response = await fetch(url, requestOption); let result = await response.json(); const teamDriveId = result.id; console.log("Created TeamDrive ID", teamDriveId); // Get created drive user permission ID console.log(`Getting creator permission ID`); url = `https://www.googleapis.com/drive/v3/files/${teamDriveId}/permissions`; params = { supportsAllDrives: true }; params.fields = "permissions(id,emailAddress)"; url += "?" + this.enQuery(params); requestOption = await this.requestOption(); response = await fetch(url, requestOption); result = await response.json(); const currentUserPermissionID = result.permissions[0].id; console.log(currentUserPermissionID); // Share team drive with email address console.log(`Sharing the team drive to ${requestBody.emailAddress}`); url = `https://www.googleapis.com/drive/v3/files/${teamDriveId}/permissions`; params = { supportsAllDrives: true }; url += "?" + this.enQuery(params); requestOption = await this.requestOption( { "Content-Type": "application/json" }, "POST" ); post_data = { role: "organizer", type: "user", emailAddress: requestBody.emailAddress, }; requestOption.body = JSON.stringify(post_data); response = await fetch(url, requestOption); await response.json(); // Delete creator from the team drive console.log("Deleting creator from the team drive"); url = `https://www.googleapis.com/drive/v3/files/${teamDriveId}/permissions/${currentUserPermissionID}`; params = { supportsAllDrives: true }; url += "?" + this.enQuery(params); requestOption = await this.requestOption({}, "DELETE"); response = await fetch(url, requestOption); return await response.text(); } async accessToken() { console.log("accessToken"); if ( this.authConfig.expires == undefined || this.authConfig.expires < Date.now() ) { const obj = await this.fetchAccessToken(); if (obj.access_token != undefined) { this.authConfig.accessToken = obj.access_token; this.authConfig.expires = Date.now() + 3500 * 1000; } } return this.authConfig.accessToken; } async fetchAccessToken() { console.log("fetchAccessToken"); const url = "https://www.googleapis.com/oauth2/v4/token"; const headers = { "Content-Type": "application/x-www-form-urlencoded", }; const post_data = { client_id: this.authConfig.client_id, client_secret: this.authConfig.client_secret, refresh_token: this.authConfig.refresh_token, grant_type: "refresh_token", }; let requestOption = { method: "POST", headers: headers, body: this.enQuery(post_data), }; const response = await fetch(url, requestOption); return await response.json(); } async requestOption(headers = {}, method = "GET") { const accessToken = await this.accessToken(); headers["authorization"] = "Bearer " + accessToken; return { method: method, headers: headers }; } enQuery(data) { const ret = []; for (let d in data) { ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d])); } return ret.join("&"); } } //hCaptcha Verification Class class hCaptcha{ constructor(secret, sitekey) { this.secret = secret; this.sitekey = sitekey; } //Verification function, the result.success flag would be "true" on successful verification async verify(response_token) { console.log("Verifying hCaptcha"); let url = "https://hcaptcha.com/siteverify"; let post_data = { secret: this.secret, response: response_token, sitekey: this.sitekey }; console.log(this.enQuery(post_data)); let response = await fetch(url, { method: 'POST', body: this.enQuery(post_data), headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }); let result = await response.json(); return result; //check for result.success for status of verification } //Reusing the googleDrive Object to QueryString Method enQuery(data) { const ret = []; for (let d in data) { ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d])); } return ret.join("&"); } } function getRandomInteger(min, max){ let rndchoice = Math.floor(Math.random() * Math.floor(max)) + (min-1); console.log(rndchoice); return rndchoice; }
DRIVE

DRIVE

var authConfig = { version: "4.5", dailyLimit: true, // Whether to limit each mailbox to submit requests only once a day client_id: 'ClientID', // Google Client ID client_secret: 'ClientSecret', // Google Client Secret domain: "! ", black_list: ["email@gmail.com"] }; var gd; authConfig.domainCount = 4; //Remplace 4 by the number of different drives you have var today; // Create an account at https://dashboard.hcaptcha.com/signup and fulfill all details var hCaptchaConfig = { secret: ' ', sitekey: ' ' }; var html = ` TeamDrive Generator

Before using


This website is a free generator of shared drives.
But free doesn't mean that you can abuse!

What is considered as abuse?

- Creating tens of empty shared drives
- Storing Tb of data that you will never use
- Storing illegal stuff or porn

What are the possible consequences due to abuse?

- Google will put restrictions as they will do on EDU
- University and organizations can delete all team drives
- University and organizations will cancelled their subscription (worst case scenario)

Abusing this free service will lead to more google restrictions.

?

Google Logo

Create Google Shared Drives for FREE !

Operational : 150

Non Working : 0

Testing : 0

`; addEventListener("fetch", (event) => { event.respondWith(handleRequest(event.request)); }); var dailyLimit = []; /** * Fetch and log a request * @param {Request} request */ async function handleRequest(request) { if (authConfig.dailyLimit) { if (!today) today = new Date().getDate(); // Remove email rate limit every day if (new Date().getDate() != today) { today = new Date().getDate(); dailyLimit.length = 0; } } if (gd == undefined) { gd = new googleDrive(authConfig); } let url = new URL(request.url); let path = url.pathname; switch (path) { case "/teamDriveThemes": let teamDriveThemes = await gd.getTeamDriveThemes(); return new Response(JSON.stringify(teamDriveThemes), { status: 200, headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", }, }); case "/drive": if (request.method === "POST") { const requestBody = await request.json(); //验证码 if (requestBody.recaptcha.length == 0) { return new Response("You have to complete the captcha to get a shared drive.", { status: 400, }); }else{ //hCaptcha Verification let hc = new hCaptcha(hCaptchaConfig.secret, hCaptchaConfig.sitekey); let verificationResponse = await hc.verify(requestBody.recaptcha); if(!verificationResponse.success){ return new Response("Captcha verification: " + verificationResponse["error-codes"], { status: 400, }); } } //团盘多选 if (requestBody.channel ==0 ){ requestBody.channel = getRandomInteger(1,authConfig.domainCount); } //The client secret and the refresh token used here are the one set in the beginning of the file if (requestBody.channel == 1) { authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } if (requestBody.channel == 2) { authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } if (requestBody.channel == 3) { authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } // If you want to use a custom client id & secret : if (requestBody.channel == 4) { authConfig.client_id = "CLIENT ID"; authConfig.client_secret = "CLIENT SECRET"; authConfig.refresh_token = "REFRESH TOKEN"; authConfig.domain = "NAME OF THE DOMAIN (it can be empty)"; } if (authConfig.dailyLimit) { if (dailyLimit.includes(requestBody.emailAddress)) { return new Response( "⏳ You have reached the maximum number of creations allowed today!", { status: 429, } ); } else { dailyLimit.push(requestBody.emailAddress); } } if (authConfig.black_list.includes(requestBody.emailAddress)) { return new Response("Please fill in all the fields", { status: 429, }); } try { let result = await gd.createAndShareTeamDrive(requestBody); return new Response( "✅ Your Shared Drive has successfully been created !", { status: 200, } ); } catch (err) { return new Response("Domain #" + requestBody.channel + " - " + err.toString(), { status: 500, }); } } else if (request.method === "OPTIONS") { return new Response("", { status: 200, headers: { "Access-Control-Allow-Origin": "*", }, }); } else { return new Response("Bad Request", { status: 400, }); } default: return new Response(html, { status: 200, headers: { "Content-Type": "text/html; charset=utf-8", "Access-Control-Allow-Origin": "*", }, }); } } // https://stackoverflow.com/a/2117523 function uuidv4() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { // tslint:disable-next-line:one-variable-per-declaration const r = (Math.random() * 16) | 0, // tslint:disable-next-line:triple-equals v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16); }); } class googleDrive { constructor(authConfig) { this.authConfig = authConfig; this.accessToken(); } async getTeamDriveThemes() { let url = "https://www.googleapis.com/drive/v3/about"; let requestOption = await this.requestOption(); let params = { fields: "teamDriveThemes" }; url += "?" + this.enQuery(params); let response = await fetch(url, requestOption); return await response.json(); } async createAndShareTeamDrive(requestBody) { // Create team drive console.log("Creating TeamDrive"); let url = "https://www.googleapis.com/drive/v3/drives"; let requestOption = await this.requestOption( { "Content-Type": "application/json" }, "POST" ); let params = { requestId: uuidv4() }; url += "?" + this.enQuery(params); let post_data = { name: requestBody.teamDriveName, }; if ( requestBody.teamDriveThemeId && requestBody.teamDriveThemeId !== "random" ) { post_data.themeId = requestBody.teamDriveThemeId; } requestOption.body = JSON.stringify(post_data); let response = await fetch(url, requestOption); let result = await response.json(); const teamDriveId = result.id; console.log("Created TeamDrive ID", teamDriveId); // Get created drive user permission ID console.log(`Getting creator permission ID`); url = `https://www.googleapis.com/drive/v3/files/${teamDriveId}/permissions`; params = { supportsAllDrives: true }; params.fields = "permissions(id,emailAddress)"; url += "?" + this.enQuery(params); requestOption = await this.requestOption(); response = await fetch(url, requestOption); result = await response.json(); const currentUserPermissionID = result.permissions[0].id; console.log(currentUserPermissionID); // Share team drive with email address console.log(`Sharing the team drive to ${requestBody.emailAddress}`); url = `https://www.googleapis.com/drive/v3/files/${teamDriveId}/permissions`; params = { supportsAllDrives: true }; url += "?" + this.enQuery(params); requestOption = await this.requestOption( { "Content-Type": "application/json" }, "POST" ); post_data = { role: "organizer", type: "user", emailAddress: requestBody.emailAddress, }; requestOption.body = JSON.stringify(post_data); response = await fetch(url, requestOption); await response.json(); // Delete creator from the team drive console.log("Deleting creator from the team drive"); url = `https://www.googleapis.com/drive/v3/files/${teamDriveId}/permissions/${currentUserPermissionID}`; params = { supportsAllDrives: true }; url += "?" + this.enQuery(params); requestOption = await this.requestOption({}, "DELETE"); response = await fetch(url, requestOption); return await response.text(); } async accessToken() { console.log("accessToken"); if ( this.authConfig.expires == undefined || this.authConfig.expires < Date.now() ) { const obj = await this.fetchAccessToken(); if (obj.access_token != undefined) { this.authConfig.accessToken = obj.access_token; this.authConfig.expires = Date.now() + 3500 * 1000; } } return this.authConfig.accessToken; } async fetchAccessToken() { console.log("fetchAccessToken"); const url = "https://www.googleapis.com/oauth2/v4/token"; const headers = { "Content-Type": "application/x-www-form-urlencoded", }; const post_data = { client_id: this.authConfig.client_id, client_secret: this.authConfig.client_secret, refresh_token: this.authConfig.refresh_token, grant_type: "refresh_token", }; let requestOption = { method: "POST", headers: headers, body: this.enQuery(post_data), }; const response = await fetch(url, requestOption); return await response.json(); } async requestOption(headers = {}, method = "GET") { const accessToken = await this.accessToken(); headers["authorization"] = "Bearer " + accessToken; return { method: method, headers: headers }; } enQuery(data) { const ret = []; for (let d in data) { ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d])); } return ret.join("&"); } } //hCaptcha Verification Class class hCaptcha{ constructor(secret, sitekey) { this.secret = secret; this.sitekey = sitekey; } //Verification function, the result.success flag would be "true" on successful verification async verify(response_token) { console.log("Verifying hCaptcha"); let url = "https://hcaptcha.com/siteverify"; let post_data = { secret: this.secret, response: response_token, sitekey: this.sitekey }; console.log(this.enQuery(post_data)); let response = await fetch(url, { method: 'POST', body: this.enQuery(post_data), headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }); let result = await response.json(); return result; //check for result.success for status of verification } //Reusing the googleDrive Object to QueryString Method enQuery(data) { const ret = []; for (let d in data) { ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d])); } return ret.join("&"); } } function getRandomInteger(min, max){ let rndchoice = Math.floor(Math.random() * Math.floor(max)) + (min-1); console.log(rndchoice); return rndchoice; }