> [!CAUTION]
> You are currently viewing version 1.9 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions).

<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.9 (unsupported)</button>

- Supported versions:
- [v1.17 (latest)](https://docs.cloud.google.com/apigee/docs/hybrid/v1.17/synchronizer-access.md.txt)
- [v1.16](https://docs.cloud.google.com/apigee/docs/hybrid/v1.16/synchronizer-access.md.txt)
- [v1.15](https://docs.cloud.google.com/apigee/docs/hybrid/v1.15/synchronizer-access.md.txt)
- [v1.14](https://docs.cloud.google.com/apigee/docs/hybrid/v1.14/synchronizer-access.md.txt)
- [List of supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions)
- Unsupported versions:
- [v1.13](https://docs.cloud.google.com/apigee/docs/hybrid/v1.13/synchronizer-access.md.txt)
- [v1.12](https://docs.cloud.google.com/apigee/docs/hybrid/v1.12/synchronizer-access.md.txt)
- [v1.11](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/synchronizer-access.md.txt)
- [v1.10](https://docs.cloud.google.com/apigee/docs/hybrid/v1.10/synchronizer-access.md.txt)
- [v1.9](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/synchronizer-access.md.txt)
- [v1.8](https://docs.cloud.google.com/apigee/docs/hybrid/v1.8/synchronizer-access.md.txt)
- [v1.7](https://docs.cloud.google.com/apigee/docs/hybrid/v1.7/synchronizer-access.md.txt)
- [v1.6](https://docs.cloud.google.com/apigee/docs/hybrid/v1.6/synchronizer-access.md.txt)
- [v1.5](https://docs.cloud.google.com/apigee/docs/hybrid/v1.5/synchronizer-access.md.txt)
- [v1.4](https://docs.cloud.google.com/apigee/docs/hybrid/v1.4/synchronizer-access.md.txt)
- [v1.3](https://docs.cloud.google.com/apigee/docs/hybrid/v1.3/synchronizer-access.md.txt)
- [v1.2](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/synchronizer-access.md.txt)
- [v1.1](https://docs.cloud.google.com/apigee/docs/hybrid/v1.1/synchronizer-access.md.txt)

This section describes the Synchronizer.

## Synchronizer overview

In Apigee hybrid, the Synchronizer's primary job is to poll and download the runtime contracts
which are supplied by the management plane. Information communicated by contract includes API
proxies, API products, caches, and virtual hosts. Synchronizer by default stores environment
configuration data in the Cassandra database.

Synchronizer instances running in the runtime-plane are expected to poll the management
plane on a regular basis, download the contracts and make the same available to local runtime
instances.

One Synchronizer can support many Message Processors deployed in the same pod.

## Enable Synchronizer access

You must grant the [Synchronizer](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/what-is-hybrid.md.txt#synchronizer) permission to pull down
Apigee artifacts, such as proxy bundles and resources from the management plane. You must call an
Apigee API to authorize the Synchronizer to pull artifacts down from the management plane to the
runtime plane.

1. Ensure that you have enabled the Apigee API as explained in the Google Cloud setup steps. For details, see [Enable APIs](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/precog-enableapi.md.txt).
2. Locate the **write-enabled Google Cloud service account key** (a JSON file) that you downloaded as part of [Create service accounts and credentials](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/install-service-accounts.md.txt). The service account has the **Apigee Org Admin** role and is the one named "apigee-org-admin". If you did not previously create this service account, you must do so before continuing.
3. Use the Apigee Org Admin service account key to generate an OAuth 2.0 access token. This token is required to authenticate the [Apigee APIs](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest.md.txt).

   ### gcloud

   Use [gcloud](https://cloud.google.com/sdk/docs/) to obtain an
   OAuth 2.0 access token, passing the service account credentials JSON file that you
   downloaded using `GOOGLE_APPLICATION_CREDENTIALS` environment variable:

       export GOOGLE_APPLICATION_CREDENTIALS=your_sa_credentials_file.json
       gcloud auth application-default print-access-token

   An OAuth2.0 token is returned.

   For more information, see
   [gcloud beta auth application-default print-access-token](https://cloud.google.com/sdk/gcloud/reference/beta/auth/application-default/print-access-token).
4. Copy the OAuth 2.0 token returned and store it in a variable, such as `TOKEN`. For example:

   ```
   export TOKEN=ya29....Ts13inj3LrqMJlztwygtM
   ```
5. Call the [setSyncAuthorization API](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/setSyncAuthorization.md.txt) to enable the required permissions for Synchronizer:

   > [!NOTE]
   > **IMPORTANT:** Be sure that the service account name that you add to this API has the role **Apigee Synchronizer Manager** . See also [Create service accounts and credentials](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/install-service-accounts.md.txt).

   ```
   curl -X POST -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type:application/json" \
     "https://apigee.googleapis.com/v1/organizations/your_org_name:setSyncAuthorization" \
      -d '{"identities":["serviceAccount:synchronizer-manager-service-account-name"]}'
   ```

   Where:
   - `your_org_name`: The name of the hybrid organization.
   - `synchronizer-manager-service-account-name`: The name of a service account with the **Apigee Synchronizer Manager** role. The name is formed like an email address. For example: `my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com`

   Example:

   ```
   curl -X POST -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type:application/json" \
     "https://apigee.googleapis.com/v1/organizations/my_org:setSyncAuthorization" \
      -d '{"identities":["serviceAccount:my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com"]}'
   ```

   For more information on this API, see [setSyncAuthorization API](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/setSyncAuthorization.md.txt).
6. To verify that the service account was set, call the following API to get a list of service accounts:

   ```
   curl -X POST -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type:application/json" \
     "https://apigee.googleapis.com/v1/organizations/your_org_name:getSyncAuthorization" \
      -d ''
   ```

   The output looks similar to the following:

   ```
   {
      "identities":[
         "serviceAccount:my-synchronizer-manager-service_account@my_project_id.iam.gserviceaccount.com"
      ],
      "etag":"BwWJgyS8I4w="
   }
   ```