title: How to add multiple users email id to share file from a google drive api using node js
body: <p>When I run this code , an error came ==&gt;</p>
  <blockquote>
  <p>The permission type field is required.</p>
  </blockquote>
  <blockquote>
  <p>How can i use multiple Email addressess to share the file of google drive in node js</p>
  </blockquote>
  <pre><code>async function updateFilePermissions(){
      try{
          const fileId = fileId;
  let resourceContents = [{
      role: 'writer',
      type: 'user',
      emailAddress: 'SomeEmail@gmail.com',
    },{
      role: 'writer',
      type: 'user',
      emailAddress: 'someEmail@gmail.com'
    }];
  
    await drive.permissions.create({
  
      resource: resourceContents,
      fileId: fileId,
      sendNotificationEmail: true,
      fields: '*'
  
    });
   /* 
      webViewLink: View the file in browser
      webContentLink: Direct download link 
      */
      const result = await drive.files.get({
        fileId: fileId,
        fields: 'webViewLink, webContentLink',
      });
      console.log(result.data);
    } catch (error) {
      console.log(error.message);
    }
  }
  </code></pre>