Follow the steps in Google Service Account Setup (Part 1).

  • Go to the Google admin site and login as a user with appropriate permissions.

  • From the menu go to Security > API Controls (if security isn't visible click the Show more button).

  • Click the manage domain wide delegation link.

  • Click Add New.

  • Enter the Client ID created earlier and the following scope and click authorize.