In order to make
[real-time updates](https://developers.google.com/actions-center/verticals/offers/integration-steps/real-time-api-updates), you need to make requests to the
[Maps Booking API](https://developers.google.com/maps-booking/reference/maps-booking-api/rest). The Maps Booking API requires that you
authenticate your requests via OAuth 2.0 using a GCP service account which
has access to the API, and has been allocated the necessary QPS. This guide will walk you through the steps to:

1. Set up your Google Cloud project
2. Create a service account
3. Enable the Maps Booking API in your GCP project
4. Debug common issues

For information on how to make requests to the API, see our
[real-time API updates](https://developers.google.com/actions-center/verticals/offers/integration-steps/real-time-api-updates) section of the Offers guide.

## Setting up your Google Cloud project with the Actions Center

> [!NOTE]
> **Note:** If you have already set up your Partner Portal account, you must use the Google Cloud project that was entered as part of the setup. If you no longer have access to that Google Cloud Platform project, or need help identifying it, reach out to your Actions Center contact.

1. Log in to your [Google Cloud Platform account](https://cloud.google.com/).
2. You can [create a new project](https://support.google.com/googleapi/answer/6251787) or use an existing project for this purpose.
   - Please note down the cloud project number as you will require it in the next steps. Your cloud project number can also be found on Google Cloud Platform Home Page. The cloud project number is always numeric only. ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic1.png)
3. Log in to the [Partner Portal](https://partnerdash.google.com/apps/reservewithgoogle/onboarding).
4. Complete step 1 on the Onboarding Tasks page of the Partner Portal by submitting the cloud project number and the cloud project email address (the email addressed used to administer the cloud project). ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic2.png)

## Creating a Service Account and OAuth credentials

> [!NOTE]
> **Note:** These steps must be performed by the account with the developer email that was entered in the onboarding tasks steps.

1. Log back into your [Google Cloud Platform account](https://cloud.google.com/).
2. Navigate to [IAM \& admin \> Service accounts](https://console.cloud.google.com/iam-admin/serviceaccounts). ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic3.png)
3. Search for your existing or newly created cloud project id. ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic4.png)
4. [Create](https://console.cloud.google.com/iam-admin/serviceaccounts/create) a service account. ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic5.png)
5. Fill out the service account details. ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic6.png)
6. Assign the new service account the role that is most suitable for your application needs. The choice of role for the service account will not have any effect on what calls can be made to the Google Maps Booking API, as the allocation of sufficient quota to use them is determined instead by the association of your project number in the Actions Center configuration. If you are unsure what role to pick, just pick Project \> Viewer.
7. After clicking "continue" in step (6), you will be given an option to create JSON keys. ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic8.png)
8. Save the json credentials. Make sure to store these in a safe place, as you will not be able to retrieve them at a later time. ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic9.png)
9. Log back into Partner Portal and complete remaining tasks on the [Onboarding Tasks](https://partnerdash.google.com/apps/reservewithgoogle/onboarding) page of the Partner Portal.

## Enable the MapsBooking API

1. Log in to your [Google Cloud Platform account](https://cloud.google.com/).
2. Navigate to [API \& Services \> Dashboard](https://console.cloud.google.com/apis/dashboard). ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic10.png)
3. Click on [Enable APIs and Services](https://console.cloud.google.com/apis/library) and search for `Google Maps Booking API`. ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic11.png)
4. Enable the following APIs:
   - Google Maps Booking API
   - Google Maps Booking API (Dev) ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic12.png) ![](https://developers.google.com/static/actions-center/images/tutorial_auth_mapsapi_pic13.png)

> [!NOTE]
> **Note:** If you have already completed the onboarding steps and would like to update your existing cloud project to a new one, please reach out to your Actions Center contact.

## Common Errors

There are a variety of reasons that you may experience authorization issues
when making Real-Time Update requests. If you need general guidance on how to
make Real-Time Updates requests, see our
[real-time API updates](https://developers.google.com/actions-center/verticals/offers/integration-steps/real-time-api-updates) section of the Offers guide. You can also find
sample clients in multiple languages in the
[Code Samples](https://developers.google.com/actions-center/verticals/offers/reference/real-time-updates-rest/code-samples/code-sample)
section.

If you are encountering 403 errors, check that you are following all of the
following requirements:

1. Use a [Google Client Library](https://developers.google.com/api-client-library).
2. Create [OAuth Credentials using Service Account Auth](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests).
3. Authorize against the **appropriate scope**.
4. Make calls to the **appropriate endpoint** (listed below).

Ensure you are **making calls to the correct endpoint:**

1. Sandbox: `https://partnerdev-mapsbooking.googleapis.com/v1alpha/...`
2. Production: `https://mapsbooking.googleapis.com/v1alpha/...`

Ensure you are **authorizing your OAuth credentials requests properly:**

1. You are authorizing against the scope "https://www.googleapis.com/auth/mapsbooking".
2. You are using the service account key created in [Creating a Service Account and OAuth credentials](https://developers.google.com/actions-center/verticals/offers/reference/tutorials/authenticate-with-mapsbooking-api#creating-a-service-account-and-OAuth-credentials).

### Still seeing errors?

If you are still seeing errors after following these steps,
reach out to your Actions Center contact with the following information:

- Cloud project number and project id with a screenshot
- Service account id
- Email used to create the service account
- End-point details attempted to make requests to
- Time of request attempts
- Full request and error messages received when making requests.