title: Discord Oauth2 Join Guild
body: <pre><code>const guildMembersResponse = fetch(`http://discordapp.com/api/guilds/440494010595803136/members/278628366213709824`,
              {
                method: 'PUT',
                headers: {
                  Authorization: `Bearer TOKEN`,
                },
              });
              setTimeout(() =&gt; {
                  console.log(guildMembersResponse)
              }, 500);
  </code></pre>
  
  <p>I want to join a user to my Discord server with his userid and his token in nodejs, but if I request the Dicord api I get an error: </p>
  
  <pre><code>Promise {
   Response {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: false, error: 
    null },
    [Symbol(Response internals)]:
    { url:
    'https://discordapp.com/api/guilds/440494010595803136/members/278628366213709824',
     status: 401,
     statusText: 'UNAUTHORIZED',
     headers: [Headers] } } }
  </code></pre>
  
  <blockquote>
    <p>I am using the <a href="https://www.npmjs.com/package/node-fetch" rel="noreferrer">node-fetch</a> library!</p>
  </blockquote>