Why are we using the Google API?
We're trying to automate the Usermanagment such as Roles in the Company, Calendar Events, Groups, Chatrooms
In which cases does it make sense to use the Google API?
In every case the Google API offers a solution (and you want to automate)
What is an Oauth 2.0 Token?
OAuth 2.0 is an authorization protocol and NOT an authentication protocol. As such, it is designed primarily as a means of granting access to a set of resources, for example, remote APIs or user’s data.
Starting off with POSTMAN
How to generate an OAuth 2.0 token:
- Ensure that the Google APIs are enabled
Go to the API Console. Select a project or create a new one. Select APIs & services Select Library Click the API you want to enable Click ENABLE.
- Create an OAuth 2.0 client ID
Go to Google Console -> API -> OAuth consent screen Add `getpostman.com` to the Authorized domains. Click Save.
Go to Google Console -> API -> Credentials Click 'Create credentials' -> OAuth client ID -> Web application
Authorized redirect URIs: https://www.getpostman.com/oauth2/callback
Copy the generated Client ID and Client secret fields for later use
In Postman select Authorization tab and select "OAuth 2.0" type.
Click 'Get New Access Token'
Fill the GET NEW ACCESS TOKEN form as following
Token Name: 'Google OAuth getpostman'
Grant Type: 'Authorization Code'
Access Token URL:
Client ID generated in the step 2 (also shown in downloadable JSON)
Client secret generated in the step 2 (also shown in downloadable JSON)
Scope: see the Google docs for the required OAuth scope (e.g.,
"Send as Basic Auth header"
'Request Token' and 'Use Token'
The generated Token is only usable for the Scope you intended it to be. If you need another Scope you might want to Request another token. Otherwise you might face access right problems.
Usefull Links for API Documentations:
Google Projects and Userroles (GCP):
Manage Google Users (GW):
Add Members to Groups:
Top comments (0)