> For the complete documentation index, see [llms.txt](https://docs.appmixer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmixer.com/connector-configuration/apigee.md).

# Apigee

The Apigee connector allows you block requests from specific IP addresses. To make the integration work, you need to

1. register Google OAuth2 application
2. perform setup in Apigee instance

## OAuth app properties

The Apigee connector signs in with a Google Cloud OAuth client. It requests `https://www.googleapis.com/auth/cloud-platform` (a sensitive scope) together with `profile` and `email`.

| Property                | Value                                                                                                                                                                                                                                                                                                    |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Multi-tenant**        | **Conditional.** Any Google account can connect once the app has user type *External*, publishing status *In production*, and is verified for the `cloud-platform` scope. An *Internal* app serves only your own Google Workspace organization. An app in *Testing* serves only the test users you list. |
| **Vendor review**       | **By scope.** `cloud-platform` is a sensitive scope: brand verification (home page and privacy policy on a domain you own) plus a demo video and a justification of the scope.                                                                                                                           |
| **Review time**         | Google's estimates: brand 2–3 business days, sensitive scopes about 10 business days.                                                                                                                                                                                                                    |
| **Users before review** | 100. In Testing these are the listed test users. In production, an unverified app gets 100 new users over the lifetime of the project, and the count never resets.                                                                                                                                       |
| **App owner**           | A Google Cloud project, and Search Console ownership of every authorized domain.                                                                                                                                                                                                                         |
| **Regions**             | One app works worldwide.                                                                                                                                                                                                                                                                                 |
| **Client secret**       | No expiry documented.                                                                                                                                                                                                                                                                                    |
| **Rate limits**         | A per-project limit on new user authorizations, which Google does not publish. The Apigee API has its own request quota.                                                                                                                                                                                 |
| **Checked**             | 2026-11-13                                                                                                                                                                                                                                                                                               |

**Limitations**

* While the app is in Testing, a connected account stops working 7 days after consent. In production, Google revokes access that was not used for 6 months, and keeps at most 100 connections per Google account and client.
* The OAuth consent alone does not give access to Apigee. The connecting user also needs the IAM permissions listed under [Required user roles](#required-user-roles).
* A Google Workspace administrator can block third-party apps for their organization, whatever the verification status.

Sources: [Sensitive scope verification](https://developers.google.com/identity/protocols/oauth2/production-readiness/sensitive-scope-verification), [Unverified apps](https://support.google.com/cloud/answer/13463817), [Verification requirements](https://support.google.com/cloud/answer/13464321), [Using OAuth 2.0 to access Google APIs](https://developers.google.com/identity/protocols/oauth2). What the rows mean: [OAuth app properties](https://docs.appmixer.com/connector-configuration/oauth-app-properties.md).

## Google OAuth2 application registration

### Application verification

In 2020 Google introduced *Application verification* If an app uses Google APIs to access Google users’ data. This makes it impossible to use the Appmixer Google modules in production without the verification process. Such a verification process has to be done by you.

Most of the Google modules need what Google marks as *Sensitive* or *Restricted Scope* in order to work. For example, the Gmail module needs <https://www.googleapis.com/auth/gmail.compose> scope to create a new email and <https://www.googleapis.com/auth/gmail.readonly> to get new emails.

#### Required scopes

* [www.googleapis.com/auth/cloud-platform](http://www.googleapis.com/auth/cloud-platform) (sensitive scope)

#### Required user roles

The connector requires the following IAM permission. This is the end-user permission needed to use the connector:

* **apigee.keyvaluemapentries.get**
* **apigee.keyvaluemapentries.create**
* **apigee.keyvaluemapentries.update**
* **apigee.environments.list** (Optional. Used to display a list of Apigee environments, allowing the user to easily select the desired environment in the Designer.)
* **apigee.keyvaluemaps.create** (Optional. If this permission is not granted, you will need to manually create a Key Value Map (KVM) in Apigee; see the [KVM storage](#configure-kvm-storage) section for instructions. If the permission is granted, the connector will automatically create the KVM.)

### Register Oauth2 app

Go to the Google developer console at <https://console.developers.google.com/> and create a new project.

![Developer Console](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-9f31a8002b8514bd88bfe72b3ee21427b0cfff4d%2Fgoogle-1.png?alt=media)

![New Project](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-26f2887a221e823e92f8867aaf206f2cc10aa840%2Fgoogle-2.png?alt=media)

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-a270b6d75f304ffe7d1a1ef887528bbe7edc0267%2Fgoogle-3.png?alt=media)

Next, enable the required APIs for your project. Go to you project APIs & Services > Enable APIs & service and click on the `Enable APIs and Services` button. Enable the following APIs:

* Apigee API: apigee.googleapis.com
* Api HUB API: apihub.googleapis.com
* Service Networking: servicenetworking.googleapis.com
* Compute Engine: compute.googleapis.com
* Cloud Key Management Service (KMS): cloudkms.googleapis.com

source: [Step 1: Enable required APIs](https://cloud.google.com/apigee/docs/api-platform/get-started/enable-apis)

### OAuth consent screen

The next step is the OAuth consent screen.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-79edd0ba757ea4e246420e72b8b5aa4d065409b4%2Fgoogle-12.png?alt=media)

User Type - Internal vs External. The Internal user type allows you to use the Google modules without the app verification process mentioned at the beginning of this page. However, the modules will work only for accounts within your organization.

We are going to choose External for the purpose of this tutorial.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-5fcbe8d9a577626d21a29938e7931605f30af01c%2Fgoogle-13.png?alt=media)

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-1e7839fbb1a9b10d725b746fae4ac09a6535ae17%2Fgoogle-14.png?alt=media)

On the next page, leave the scopes empty.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-e7ed248cfb29c141c7faad5cef1df519fdca4194%2Fgoogle-15.png?alt=media)

You can add test users, but you can do this later. Only users added as test users will be able to authenticate!

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-349f876aa9c0d9bc9fb8ef4fee9f664d921678b8%2Fgoogle-16.png?alt=media)

Here is the Oauth consent screen configured. The app is in *the testing* mode, it is *external* (for users outside your organization). No more than 100 accounts (user cap) can be used with this application.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-d6aac7291ea7f00c4b07819593aff3391240cf3d%2Fgoogle-17.png?alt=media)

### Client ID and Client Secret

We need a client ID and a client secret.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-b37f8594c9329a773d1ec80aec35f67ac22cf449%2Fgoogle-18.png?alt=media)

Choose the *Web application* type and give it a name and authorize redirect URI.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-894acf9f5e16501dc3a3509c67897adaadb2f600%2Fgoogle-19.png?alt=media)

For the purpose of this tutorial, we are going to use localhost:2200 which is the default port for the Appmixer API when running on localhost. If you are creating an Oauth application for your production/QA, the URI of your server will be here. The suffix /auth/google/callback will remain there.

You will get your Client ID and Client Secret. Set them in the Backoffice; see [Backoffice configuration](#backoffice-configuration).

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-7f9912c85220eb8f65f62a89027ebd78fe29e911%2Fgoogle-20.png?alt=media)

### Domain verification

In order to use Google API Webhooks, you have to verify your domain ownership. More about domain verification can be found [here](https://support.google.com/a/topic/9196?hl=en\&ref_topic=3540977). If you use the Appmixer Self-Managed package and you run Appmixer on your own servers using your custom domain, you can use [CNAME](https://support.google.com/a/answer/47283?hl=en\&ref_topic=29598) records to verify your domain ownership. Otherwise, if you are an Appmixer Hosted customer, you can use the [*HTML file method*](https://support.google.com/a/answer/63026?hl=en) to verify your Appmixer tenant domain (`api.YOUR_TENANT.appmixer.cloud`) at Google.

{% hint style="info" %}
When you use a Google Webhook component without a verified domain, you will receive the **Unauthorized WebHook callback channel error.**
{% endhint %}

First, open the Google developers console and your Appmixer project and follow the instructions in the next picture.

![Domain verification](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-04b01b66e856c25a4838a368a7ceb28b69e294f6%2Fgoogle-23.png?alt=media)

Add your Appmixer tenant API URL (`api.YOUR_TENANT.appmixer.cloud`) and continue to verify the domain ownership. Click 'Take me there' and then 'Add a property'.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-cfc8e2b1f04d475f634b4a463cc0496045745bce%2Fgoogle-26.png?alt=media)

Again, use `api.YOUR_TENANT.appmixer.cloud`. Then download the HTML verification file.

![Download HTML verification file](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-bfc9ba46ffc85ee1d9df1d022116ac61b74d90d2%2Fgoogle-28.png?alt=media)

After you download your HTML verification file, upload it via the Appmixer Backoffice interface to the *Public Files* section on the left. When you are done you should see your file listed:

![Google verification file uploaded via Backoffice](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-d72f8f9236b257159e95bbba67f1ca3422b6c58a%2Fgoogle-29.png?alt=media)

Click the 'Verify' button to finish the verification process.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-28a61778ac9cb0c16bcd47897d77d34b8f0279cc%2Fgoogle-30.png?alt=media)

Now, you can go back to the developer console and add the `api.YOUR_TENANT.appmixer.cloud` domain once more. But this time, because it's already verified, it will appear in the list of your domains.

The new domain has to be added to the *OAuth consent screen* as well.

![](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-87dcccd7f16815afb4674e89afa645a580ed1fd6%2Fgoogle-33.png?alt=media)

## Apigee setup

### Blocking IP Shared Flow Installation Guide

Shared flows in Apigee allow you to create reusable policies that can be applied across multiple API proxies. Blocking IP Shared Flow is a shared flow that blocks requests from specific IP addresses.

To install the Blocking IP Shared Flow and apply the Shared flow in any Proxy API, follow these steps:

Get the bundle:

{% file src="/files/xeGXir4MFCV3AHtUaN2D" %}

Upload bundle Go to Apigee and navigate to the **Shared Flows** section, then click on the `Upload Bundle` icon to upload a new shared flow bundle.

![upload bundle](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-da5fe3c83de19a84c2363d2440eea9f8d1e3e885%2Fapigee01.png?alt=media)

Deploy the shared flow

![deploy](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-8c5a86c1dcda07781d98b6274fa3806ab69f3479%2Fapigee02.png?alt=media)

![deploy](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-ac4084bab77ce2e4ca88c201b7eed347436c48b6%2Fapigee03.png?alt=media)

Once deployed, go to you API proxy and add the shared flow to the preflow of the proxy endpoint.

* API Proxy > Open your proxy > DEVELOP
* Navigate to Policies and click on the plus icon to add a policy.
* Select the **Flow Callout**
* Enter any name and display name, for example `FC-blocking-ip-shared-flow`
* Select the shared flow deplyed in the previous step: `blocking-ip-shared-flow`
* hit **Create**

![create](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-c4c410302a8642d07481e49b0331e6462b647ec9%2Fimg_10.png?alt=media)

To apply the policy, go to Proxy Endpoints and select the PreFlow tab.

Click on the plus icon to add the policy step.

![add policy step](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-92365e235fd636b92de83ac8c0de3d419944abf6%2Fimg_11.png?alt=media)

Select the policy you just created: `FC-blocking-ip-shared-flow`

![add policy](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-618a6e928d9f9ea4def29f35a12abca14682c368%2Fimg_12.png?alt=media)

* Save the changes, deploy the API proxy and you are done.

### Configure KVM storage

The Blocking IP Shared Flow uses the Apigee Key Value Map (KVM) to store the blocked IP addresses.

to create a KVM, follow these steps:

* Go to Management > Environments > {env} > Key Value Maps
* click on the `Create Key Value Map` button
* name the KVM as `apigee-blocked-ips`

![create KVM](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-7e67ad951a23b373399382f8b6327970bd275140%2Fimg_5.png?alt=media)

## Backoffice configuration

Configuration ID: `appmixer:apigee` (Backoffice → Configuration; see [Connector Configuration](https://docs.appmixer.com/getting-started/services) for how a configuration is created and how its keys reach the connector).

* `clientId` — Client ID of the Google OAuth client created above.
* `clientSecret` — Client secret of the same client.
* `callbackUrl` — Optional. The redirect URI sent to Google. By default it is `<your-api-url>/auth/apigee/callback`; set this key only when Google must redirect somewhere else. The value must also be listed as an authorized redirect URI of the OAuth client.
* `kvmBlockedIPsName` — Optional. Name of the Key Value Map that **Block IPs** writes the blocked IP addresses to (and creates if it is missing). Default `apigee-blocked-ips`. If you change it, use the same name for the KVM in [Configure KVM storage](#configure-kvm-storage) and in the shared flow.

![Creating appmixer:apigee service configuration](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-467a5c07e2f1faf7a26e983a0381ee8d2fba7575%2Fapigeeimg_5.png?alt=media)

![Setting clientId and clientSecret](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-a46445c6754539aca917d9c918a53cabb61e9529%2Fimg_6.png?alt=media)

![Setting custom callback URL](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-3d98396b4c08c037cd4f933f816b2560d070e689%2Fimg_7.png?alt=media)

The same keys can be set with the CLI (`-u` updates the existing configuration instead of creating it):

```bash
appmixer service-config set appmixer:apigee -u -d '{
  "clientId": "<client id>",
  "clientSecret": "<client secret>"
}'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appmixer.com/connector-configuration/apigee.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
