Setting up Auth

DV360 seller api onboarding

There are a few major steps to onboard an API for DV360 Seller API. DV360 Seller API is exposed as whitelist based GCP API, and uses OAuth for Authentication.

Whitelist process will be handled by contacting DV360 Seller API team.

Below are detailed steps:

  1. Sign up a Google Account by going to https://console.cloud.google.com/

    Please note this account will be used to manage access tokens for your production client. Don’t use your personal gmail account.

  2. Contact Google DV360 with the account information you have sign up to have it added to allow list.
  3. Wait for your account to be added to allow list.
  4. Submit an OAuth verification review request for your app in order to access the scope(doubleclickbidmanager).
  5. Go to https://console.cloud.google.com/. Navigate to API & Services -> Library -> Private. You should be able to see DV360 Seller API listed as one of the API available to you.
  6. Enable DV360 Seller API
  7. Navigate to Credentials -> Create a Credential -> Service Account Key. Follow instructions here: https://developers.google.com/identity/protocols/OAuth2ServiceAccount

    Set up a service account:

    Google Cloud Platform API authentication and authorization (commonly grouped together as "auth") is typically done using a service account. A service account allows your code to send application credentials directly to the Cloud API. A service account, like a user account, is represented by an email address. Unlike a user account, however, a service account belongs only to an application, and may only be used to access the API for which it was created. As an example, we will show how to create service account credentials using the Google Cloud Platform Console.

    Using the GCP Console

    From the GCP Console API Manager→Credentials page, select "Create credentials→Service account key".

    alt_text

    Next, select "New service account" from the "Service account" dropdown.

    alt_text

    Type a "Name" for this service account. This name will be used as the default name for your "Service account ID" (to the left of the "@" in the generated service account ID address), but you can change this service account ID name if you wish. These names can be arbitrary; it is only important that you remember them. Under "Key type," we recommend that you leave this value as "JSON". Click "Create", and the GCP Console will generate a JSON key (as a .json text file), prompt you to download the file to your computer, and display a Service account created dialog box.

    alt_text

    The generated JSON key will be similar to the following sample JSON key:

    {
      "type": "service_account",
      "project_id": "project-id",
      "private_key_id": "some_number",
      "private_key": "-----BEGIN PRIVATE KEY-----\n....
      =\n-----END PRIVATE KEY-----\n",
      "client_email": "<api-name>api@project-id.iam.gserviceaccount.com",
      "client_id": "...",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://accounts.google.com/o/oauth2/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "https://www.googleapis.com/...<api-name>api%40project-id.iam.gserviceaccount.com"
    }
    

    Store this JSON file securely, as it contains your private key (and this file is the only copy of that key). You will need to refer to this service account key file within your code when you wish to send credentials to the Google Cloud Platform API.

  8. Contact DV360 with the service account information you created. Specifically we will need the email for this service account. This is another whitelist process for Authorization.
  9. Once your service account is authorized to call API, you can refer to https://developers.google.com/display-video/seller for API documentation. To get auth token manually, see instructions here: https://github.com/google/oauth2l. (You will need to have already downloaded the JSON version of your service account key). There are also detailed instructions on how to programatically get Oauth Token here: https://cloud.google.com/docs/authentication/production.

Important: The OAuth scope need to be 'doubleclickbidmanager'