Search code examples
google-apigmailgoogle-calendar-api

Google integration in web application


I want to integrate gmail and google calendar in my web application. I can login via google and make api calls to either gmail OR google calendar API, depending on the authorisation that I request from google.

I have not found a way to request authorisation for more than one APIs simultaneously. Is this even possible? Is it possible to receive one access token in order to use it for requests against more than one of Google's APIs?


Solution

  • As far as I know it can be done. If you try testing it in Google Oauth 2.0 Playground and select multiple API scopes.

    "scope": "https://www.googleapis.com/auth/calendar https://mail.google.com/ https://www.googleapis.com/auth/drive"
    

    It should look like this:

    enter image description here

    Hope this helps.