title: Setting up a Discord oauth2 login on my website (with PHP?)
body: <p>So I'm having troubles learning how to set up a login through discord on my site. I've been browsing for literally hours and haven't been able to find anything I understand...</p>
  
  <p>At the moment, I have created the discord application, giving me a client ID and client secret, as well as a link back to my localhost:</p>
  
  <p><a href="https://discordapp.com/api/oauth2/authorize?client_id=550631359337594881&amp;redirect_uri=http%3A%2F%2Flocalhost&amp;response_type=code&amp;scope=identify" rel="nofollow noreferrer">https://discordapp.com/api/oauth2/authorize?client_id=550631359337594881&amp;redirect_uri=http%3A%2F%2Flocalhost&amp;response_type=code&amp;scope=identify</a></p>
  
  <p>At the moment I have it set up to redirect from a button to that URL, which then sends me to discord to accept. It then returns me to <a href="http://localhost?code=CODE_HERE" rel="nofollow noreferrer">http://localhost?code=CODE_HERE</a></p>
  
  <p>However, I don't know what I am supposed to do with this code. I am trying to set it up so that it will show the person's username with hashtag thing, and their profile picture.</p>
  
  <p>I am currently using HTML, CSS, JS, and PHP on the site, but I think I might need to use something else, but I don't know how to set that up, or what it is I need. I am running my local server with XAMPP. I'd prefer if it is just PHP, but I'm open to other options.</p>
  
  <p>Does anyone know how I can convert the code to a username + image?</p>
  
  <p>Thanks in advance!</p>