Google Ads
  • 19 Nov 2019
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Google Ads

  • Dark
    Light
  • PDF

Article Summary

# Google Ads

Start work with Google Ads

Copy AdWords folder to your environment.

1

In order to work wth AdWords API you need account details and Google OAuth 2.0 token.

Getting developer's token

Create your separate (control) account, get its ID and developer's token.

  • clientCustomerId - you account ID.

Copy it from upper right corner in AdWords account.
2

You have to specify account ID where the companies run, not the control account ID, where you got the token.

  • developerToken - developer's token.

4

In order to get it, use tutorial.

Getting Google OAuth 2.0 access_token

1) Configure the processes and get the access_token, as described in the [OAuth Authentication]( / docs / google-oauth) with one difference from the instructions in section 8:

Create an application for access_token with ** Reference = adwords **

2) Copy the ID of the Token Storage state diagram from the information block of its start node.

5

We will need this value below.

Setting up tokens in Config state diagram

1) Go to View mode of Config state diagram and press New task

5

2) Fill up next parameters:

  • Reference = config
  • clientCustomerId - you account ID
  • developerToken - developer's token
  • state_diagram_id - State token diagram ID Google OAuth 2.0

3) Press Add task

Now all required parameters for autorization in AdWords API are set and ready for getiing their values from other processes.

Description of objects in AdWords folder.

State diagram Config - autorization data storage


Process Get campaings - getting companies list

There are no incoming parameters

Outcoming parameters "success":

  • array - json array with request result

Outcoming parameters "error":

  • code - error code

Process Report - getting reports

Incoming parameters:

  • reportType - report type

Outcoming parameters "success":

  • array - json array with request result

Outcoming parameters "error":

  • code - error code

Folder AdGroupService - ad group control

Process adGroup - GET by CampaignId - getting ad group list by company ID

Incoming parameters:

  • CampaignId - company id

Outcoming parameters "success":

  • array - json array with request result

Outcoming parameters "error":

  • code - error code
  • faultstring - error text

Folder AdGroupService - ad group management

Process adGroup - UPDATE - status change by ad group

Incoming parameters:

  • adGroupId - group id
  • status - group new status

Outcoming parameters "success":

  • result - new status

Outcoming parameters "error":

  • code - error code
  • faultstring - error text

Folder AdGroupAdService - ad management

Process AD - GET by AdGroupId - getting ad list by ad group ID

Incoming parameters:

  • adGroupId - group id

Outcoming parameters "success":

  • array - json array with request result

Outcoming parameters "error":

  • code - error code
  • faultstring - error text

Folder AdGroupAdService - ad management

Process AD - UPDATE - status change by ad

Incoming parameters:

  • adGroupId - group id
  • status - ad new status
  • adId - ad id

Outcoming parameters "success":

  • result - new status

Outcoming parameters "error":

  • code - error code
  • faultstring - error text

Was this article helpful?

What's Next