title: How to use the Gmail API, OAuth2 for Apps Script, and Domain-Wide Delegation to set email signatures for users in a G Suite domain
body: <p><em>This is a follow-up to a previous question/answer I posted (<a href="https://stackoverflow.com/questions/30135119/how-to-use-the-google-email-settings-api-and-the-oauth2-for-apps-script-library/">How to use the Google Email Settings API and the OAuth2 for Apps Script Library to set email signatures for users in a Google Apps domain</a>), but I'm creating a new question since the <a href="https://developers.google.com/admin-sdk/email-settings/" rel="nofollow noreferrer">Email Settings API</a> has been deprecated and the process is significantly different now.</em></p>
  
  <p>As the administrator of a G Suite domain, how do you use the <a href="https://developers.google.com/gmail/api/v1/reference/" rel="nofollow noreferrer">Gmail API</a>  to programmatically set the email signatures of users in your domain through Google Apps Script?</p>