Generate credentials

Generate and use OAuth 2.0 to authenticate requests to the Display & Video 360 API.

Choose a project

Use a Google Cloud project to generate OAuth 2.0 credentials.

You can create a new project or use an existing one.

Create a new project

Follow the steps in the Google Cloud console to create a project and enable the Display & Video 360 API.

Use an existing project

To activate the Display & Video 360 API for an existing project:

  1. Open the API Library in the Google Cloud console. If prompted, select a project. The API Library lists all available APIs. The Display & Video 360 API is labeled Display & Video 360 API.
  2. If you don't see the API, use the search bar to find it.
  3. Select Display & Video 360 API, then click Enable.
  4. If prompted, activate billing.
  5. If prompted, accept the API's Terms of Service.

Generate credentials

After you've enabled the API for a project, generate an OAuth 2.0 client ID. Use this client ID to authenticate Display & Video 360 API requests.

To create an OAuth 2.0 client ID to use with an installed application flow:

  1. Select your Google Cloud project.
  2. Open the Credentials page in the Google Cloud console.
  3. Click Create Credentials > OAuth client ID.
  4. Select an application type when prompted. The Java and Python code snippets in the provided guides are for a Desktop app. The PHP code snippets are for a Web application.
  5. Enter any other required information. If this is your first time creating a client ID, click Configure consent screen and proceed through the prompts. You can update this information at any time.
  6. Click Create.

This creates an OAuth 2.0 client ID and client secret. Download these in JSON format.

When using OAuth 2.0, users agree to terms on a user consent screen before authentication.

To set up your project's consent screen:

  1. Open the OAuth consent screen page in the Google Cloud console. If prompted, select a project or create a new one.
  2. Fill out the form.
  3. Click Save.