This page describes how to enable and start using the Service Networking
API. For most operational use cases, Google recommends the `gcloud` [command
line interface](https://docs.cloud.google.com/sdk/gcloud/reference/beta/services/vpc-peerings). If you need
to program against the Service Networking API, you can use one of
our provided [client libraries](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/libraries.md.txt).

## Enabling the service

Enable Service Networking in the private services management
project. This project handles the private connections with consumer
VPC networks. For more information, see [Enabling private
services access](https://docs.cloud.google.com/service-infrastructure/docs/enabling-private-services-access).

### console

1. Select or create a private services management project.

   [Go to the manage resources page](https://console.cloud.google.com/cloud-resource-manager)
2. Enable the Service Networking API.

   [Enable the API](https://console.cloud.google.com/apis/library/servicenetworking.googleapis.com)

### gcloud

Activate the Service Networking API:

```
gcloud services enable servicenetworking.googleapis.com \
    --project=PROJECT_ID
```

Replace `PROJECT_ID` with the Google Cloud project ID of your
private services management project.

Service Networking enables you to offer your [managed
services](https://docs.cloud.google.com/service-infrastructure/docs/glossary#managed) on internal IP addresses to service consumers.
Service consumers use [private services
access](https://docs.cloud.google.com/vpc/docs/private-services-access) to privately
connect to your service. To set up your service for private services access,
reach out to your Google representative for more information.

> [!NOTE]
> **Note:** When you use private services access as a service producer, you are solely responsible for securing VPC networks and all resources and data available on them. Google is not responsible for how data and resources may be accessed or used by the service consumers that you are connecting with.

> [!NOTE]
> **Note:** When the Service Networking API is enabled, the service account provisioning will happen just-in-time. This means that unless we do not have a resource (for example: configuration of Private Google Access) configured which calls the API, we won't see the service account getting created. Once the service account gets provisioned, it is visible in the format service-{project number}@service-networking.iam.gserviceaccount.com and is added with roles/servicenetworking.serviceAgent policy binding on the consumer project.