DV360 seller api onboarding
There are a few major steps to onboard an API for DV360 Seller API. DV360 Seller API is exposed as allowlist based GCP API, and uses OAuth for Authentication.
Allowlist process will be handled by contacting DV360 Seller API team.
Below are detailed steps:
- 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.
- Contact Google DV360 with the account information you have sign up to have it added to allow list.
- Wait for your account to be added to allow list.
- Submit an OAuth verification review request for your app in order to access the scope(doubleclickbidmanager).
- 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.
- Enable DV360 Seller API
- 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".
Next, select "New service account" from the "Service account" dropdown.
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.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.
- Contact DV360 with the service account information you created. Specifically we will need the email for this service account. This is another allowlist process for Authorization.
- 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'