title: Is there a way to tell if an email address corresponds to a Google account?
body: <p>I am working on a Google Sheets add-on that calls <a href="https://developers.google.com/drive/api/v2/reference/permissions/insert" rel="nofollow noreferrer"><code>Permissions: insert</code></a> as described in <a href="https://developers.google.com/drive/api/v2/reference/permissions/insert" rel="nofollow noreferrer">a Stack Overflow answer</a>:</p>
  <pre><code>function addUserPermission(fileId, email, notify) {
    Drive.Permissions.insert({
      'value': email,
      'type': 'user',
      'role': 'reader',
      'withLink': false
    },
      fileId,
      {
        'sendNotificationEmails': notify
      });
  }
  </code></pre>
  <p>The <code>notify</code> flag is <code>true</code> if the user should receive an email notification of the added permission, <code>false</code> if they should not.</p>
  <p>If the <code>email</code> value is associated with a Google account (such as <code>foo@gmail.com</code>), this works whether <code>notify</code> is <code>true</code> or <code>false</code>. If the <code>email</code> value is not associated with a Google account, an exception is thrown if <code>notify</code> is <code>false</code>:</p>
  <blockquote>
  <p>ScriptError: GoogleJsonResponseException: API call to drive.permissions.insert
  failed with error: Bad Request. User message: &quot;You are trying to invite
  fakeaddress@nowhere.com. Since there is no Google account associated with this email address,
  you must check the &quot;Notify people&quot; box to invite this recipient.&quot;</p>
  </blockquote>
  <p>Is there any way to tell <em>before</em> calling <code>Drive.permissions.insert</code> that the email address is not associated with a Google account?</p>