Go to admin.google.com and select security:
Then select API Controls:
and then click on the link for Manage Domain Wide Delegation:
Click on “Add new.” The following pop-up will display:
Find the client id in the json file you downloaded earlier. Paste that in the Client ID field.
In the oAuth Scopes (comma-delimited) field paste the following string:
Next Step: Increase Quotas