See https://developers.google.com/gmail/api/quickstart/js to set this up with your own ClientID's and API Keys. You won't need to be approved by google or anything ...