Using Postman, you can accelerate the design, mocking, and testing of your scripts to make the process easier than ever to use Chrome Browser Cloud Management APIs.
When you use OAuth 2.0 for authorization, Google displays a consent screen to the user, including a summary of your project, its policies, and the requested authorization scopes of access. Configuring your app's OAuth consent screen defines what is displayed to users and app reviewers and registers your app so you can publish it later.
There are two types:
- Internal is just for users within your Google Workspace users. Requires Google Workspace or Google Identity to function. Select this option for your Postman app.
- External is available to any test user with a Google Account. Your app will start in testing mode and will only be available to users you add to the list of test users. Once your app is ready to push to production, you may need to verify your app.
Go to Menu menu > APIs & Services > OAuth consent screen in the Google Cloud console.
- Enter the App name and the user support email (this is your admin account email in the admin console), and you can also choose to display a custom logo.
- Under Authorized domains, enter getpostman.com.
- Enter an email address that you want Google to notify you about changes in your project.
- Save and continue.
- Scopes are listed here. Note that the list contains both read-only and full access. Pick and choose which scopes you need for your specific use case or add all (recommended).
- Save and continue.
- Optional: Add a user(s) that can access while the publishing status is listed as “Testing”. Enter the account you used to create the project and any others you want to provide access to by hitting the add users button.
- Click Save and continue, review the summary screen, and hit the back to dashboard button.
To authenticate as an end user and access user data in your app, you must create one OAuth 2.0 Client IDs.
- Go to Menu menu > APIs & Services > Credentials in the Google Cloud console.
- Click Create Credentials > OAuth client ID.
- Click Application type > Web application.
- In the Name field, type a name for the credential. This name is only shown in the Google Cloud console.
- For authorized redirect URI enter the following:
- Click Create. The OAuth client-created screen shows your new Client ID and Client secret.
- Click OK. The newly created credential appears under OAuth 2.0 Client IDs.
- On the OAuth client created window, click the DOWNLOAD JSON button.
- Get the latest version of the Postman desktop app from the download page and select Download for your platform. For additional information, see Installing and updating Postman.
- If you are unfamiliar with the Postman interface, take a few minutes to learn Navigating Postman.
An environment is a set of variables you can use in your Postman requests.
- You can get the latest Chrome Browser Environment and add to your workspace.
- Add the values and Save.
Variable | Type | Initial Value | Current Value |
---|---|---|---|
client_id | default | Add value from the downloaded JSON file from OAuth client ID credentials | Add value from the downloaded JSON file from OAuth client ID credentials |
client_secret | default | Add value from the downloaded JSON file from OAuth client ID credentials | Add value from the downloaded JSON file from OAuth client ID credentials |
auth_uri | default | https://accounts.google.com/o/oauth2/auth | https://accounts.google.com/o/oauth2/auth |
token_uri | default | https://oauth2.googleapis.com/token | https://oauth2.googleapis.com/token |
redirect_uris | default | https://www.getpostman.com/oauth2/callback | https://www.getpostman.com/oauth2/callback |
Workspaces enable you to organize your Postman work. To create a new workspace, select Workspaces in the header, then select Create Workspace. Select the Environment you created in the previous step from the environment selector at the top right of the workbench.
You can import Collections into your Workspace.
- You can follow these instructions to import from https://github.com/google/ChromeBrowserEnterprise/tree/main/postman
- Alternatively, you can import Collections from the file system.
- Browse to the Chrome Enterprise Postman Workspace and select the collection that you want to import.
- Click on the Raw button
- Right-click and save as .json.
- In Postman, with your Workspace chosen, click on **Import ** from the left navigation menu.
- Select the files you want to import.
- Select Import to bring your data into Postman.
- You should see all of the Collections in your Postman workspace once complete.
Each collection contains examples for GET, PUT, POST and DEL requests. Review the CBCM Postman Collections document for details.
- You will need to get the Bearer token before running a request in a collection. Bearer tokens enable requests to authenticate using an access key. The token is a text string, included in the request header. The requests inside the collection will inherit the collection level.
- Select a Collection and click on the Get New Access Token.
- If a consent windows shows, choose the account you to authentication and allow the requested scope.
- Click on the Use Token button.
- Select the request under the parent Collection, make any changes to the params or body as needed, and click on Send.
- The response from the API call will be shown in the lower pane.