Help with connecting Gmail small business to gmail

this works for accessing the google calendar api: Google Calendar API use case

modify it with the appropriate scopes and you should be good to go