Testing the Gmail API using OAuth2

This applies what we have learnt about OAuth 2 authentication to the Google Gmail API, and in doing so shows how to use scopes to grant authorization. It also indirectly builds on the Testing for e-mails with Groovy recipe Chapter 4, Web Service Test Scenarios, by providing a secure way of authenticating that was a reported Google issue when using IMAP to access a Gmail account.

To perform the steps of this recipe, you will need a Google account with a developer console and a Gmail account.

Getting ready

If you haven't already got a Google account set up, please register for one at https://accounts.google.com/Signup. This also gets you a Gmail account.

You will also need access to the Developers console to create ...

Get SoapUI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.