Skip to content

Instantly share code, notes, and snippets.

View Klema4's full-sized avatar
๐Ÿ›
I love dancing bugs!

Adam Klement Klema4

๐Ÿ›
I love dancing bugs!
View GitHub Profile
@danielsebesta
danielsebesta / index.php
Last active May 4, 2022 19:04 — forked from Jengas/index.php
Discord OAuth2 in PHP >> with working logout
<?php
define('OAUTH2_CLIENT_ID', 'Your client ID');
define('OAUTH2_CLIENT_SECRET', 'Very secret client secret!!');
$authorizeURL = 'https://discord.com/api/oauth2/authorize';
$tokenURL = 'https://discord.com/api/oauth2/token';
$apiURLBase = 'https://discord.com/api/users/@me';
$revokeURL = 'https://discord.com/api/oauth2/token/revoke';
session_start();