SHARE
TWEET

Untitled

a guest Dec 11th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $payload = '{
  2.  "client_id": "'.OAUTH2_CLIENT_ID.'",
  3.  "client_secret": "'.OAUTH2_CLIENT_SECRET.'",
  4.  "grant_type": "authorization_code",
  5.  "code": "'.$code.'",
  6.  "redirect_url": "'.$redirect.'",
  7.  "scope": "identify guilds"
  8. }';
  9.    
  10. $curl = curl_init();
  11. curl_setopt($curl, CURLOPT_URL, $token_url);
  12. curl_setopt($curl, CURLOPT_POST, 1);
  13. curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
  14. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  15. curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
  16. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  17. curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode(json_decode($payload)));
  18. $api_ruser = curl_exec($curl);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top