Skip to content

Instantly share code, notes, and snippets.

@jayktaylor
Created July 12, 2023 16:50
Show Gist options
  • Save jayktaylor/6e493ead50c9b4844936c1d9116cb9c8 to your computer and use it in GitHub Desktop.
Save jayktaylor/6e493ead50c9b4844936c1d9116cb9c8 to your computer and use it in GitHub Desktop.
Create extra permanent Discord invite link without re-using vanity URL
/**
* 1. Change the "auth" parameter to your Authorization header (check browser console -> discord.com/api requests on discord.com)
* 2. Change the "channelId" parameter to your target channel ID
* 3. Paste the following code in your browser console while logged in and viewing discord.com
**/
let channelId = '';
let auth = '';
let body = {unique: true, max_uses: 0, max_age: 0};
let headers = {'Content-Type': 'application/json', Authorization: auth}
fetch(`https://discord.com/api/v9/channels/${channelId}/invites`, {method: 'POST', credentials: 'include', headers: headers, body: JSON.stringify(body)});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment