Posts under category Google

The below output appears in my CMD (windows 10) after installing (guide here):

PHP Warning:  PHP Startup: Unable to load dynamic library 'grpc' (tried: C:\php\ext\grpc (The specified module could not be found.), C:\php\ext\php_grpc.dll (The specified module could not be found.)) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'grpc' (tried: C:\php\ext\grpc (The specified module could not be found.), C:\php\ext\php_grpc.dll (The specified module could not be found.)) in Unknown on line 0 ; Notes for Windows environments : ; ; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) ;   extension folders as well as the separate PECL DLL download (PHP 5+). ;   Be sure to appropriately set the extension_dir directive. ; ;extension=bz2 extension=curl ;extension=ffi ;extension=ftp extension=fileinfo ;extension=gd2 ;extension=gettext ;extension=gmp ;extension=intl ;extension=imap ;extension=ldap extension=mbstring ;extension=exif      ; Must be after mbstring as it depends on it ;extension=mysqli ;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client ;extension=odbc extension=openssl ;extension=pdo_firebird extension=pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql extension=pdo_sqlite ;extension=pgsql ;extension=shmop extension=grpc 

I've downloaded the correct DLL version (x64) for the right PHP version (7.4) and I can even click the location cmd tries when I run it in VS code which just opens the DLL its telling me I don't have. I've also included the extension section from my php.ini as im absoltuely at a loss at this point.

i wanted to import my shopping-feeds from Google Cloud Plattform into Merchantcenter.

So i created a bucket automatically in the Merchant Center, it shows me the name in MC but i cant find the bucket in my Google Cloud Plattform. I know it is somewhere, because i cannot create a bucket with the same naming! Is there a code where i can see where it is? In which project for example( i looked in all i have and couldnt find it). It is definetly the same email i logged in into MC and GCP.

Would nice if someone could help me...

Queen regards

Joschi

I need to get the list of all MCC with an Adwords account via Google API and R. So far I've found some packages to get the list of all clientID within a single MCC but I've found no example to get the list of all MCC within an Adwords account.

Do someone have experience on this topic?

So far I've tried:

library(RAdwordsPlus) library(RAdwords) google_auth <- doAuth() api_version <- "v201809" customer_id <- "MCC-MAIN-CODE" request <-  RAdwordsPlus::managed.customer.request(fields = c("Name", "CustomerId")) r <- RAdwordsPlus::get.service(request     = request,                  cid         = customer_id,                  auth        = google_auth,                  api.version = api_version,                  user.agent  = "r-adwordsplus-test",                  verbose     = FALSE,                  raw = FALSE,                  partial.failure = FALSE) 

Code ended up with this error:

Warning message: In parser(response) : x is not a valid managed.customer 

My Account structure is something like:

  • Main MCC

    • Customer 1 (client_id_1)

      • Camp_#1
      • Camp_#2
    • Customer 2 (client_id_2)

      • Camp_#1
      • Camp_#2
    • Customer 3 (client_id_3)

      • Camp_#1
      • Camp_#2

As stated, my goal will be to get all the client_id in order to gathering data for every Customer in the account

Thanks.

I followed this guide to create a web app flow for authenticating users with Google.

Despite listing https://www.googleapis.com/auth/adwords in the scope parameter, I don't get a gapi.client.adwords or anything like that once the authentication is complete. I am unable to retrieve any information about the user's MCC/AdWords/Ad Manager accounts.

I've tried using gapi.client.request() but I can't seem to find the arguments that I should pass for access to the AdWords API.

I'm trying to do something like this:

let __req = gapi.client.request({   method: "GET",   path: "/adwords/v?/???",   params: { fields: "???" } }); __req.execute(function(response) {   console.log(response); }); 

... or like this:

console.log(gapi.client.adwords) 

but I can't figure out what I need to pass to gapi.client.request and gapi.client.adwords doesn't exist.

Is it possible that I'm not passing a discoveryDoc or something like that? Where is the discoveryDoc for AdWords?

scope:   "https://www.googleapis.com/auth/adwords", discoveryDocs: ["???"] 

Use Case: I'm trying to get a list of MCC/AdWords/Ad Manager accounts (specifically their ID's and names) that are associated with (or owned by) the authenticated user.

Thanks in advance!

I am very new to Python and Stackoverflow. I am working on connecting my Google Ads account with Python to automate few standard charts creation and email them to my team members. Please help me resolve this as I had not been able to find an answer to it upon Googling either. Let me know if I have missed out on any info which might provide more context to the question here.

I have been using the steps as mentioned by @msaniscalchi. Created client ID and client Secret from https://console.developers.google.com and created googleads.yaml file in the same directory as the generate_refresh_token.py. When I run the script with respective client ID and client Secret values, I am getting "invalid syntax" error. I have verified my multiple times my client secret and ID values multiple times.

"""Generates refresh token for AdWords using the Installed Application flow.""" import argparse import sys from google_auth_oauthlib.flow import InstalledAppFlow from oauthlib.oauth2.rfc6749.errors import InvalidGrantError # Your OAuth2 Client ID and Secret. If you do not have an ID and Secret yet, # please go to https://console.developers.google.com and create a set. DEFAULT_CLIENT_ID = 609XXXXXXX22-58mbhXXXXXXXXXXXXXXXXXX6ri.apps.googleusercontent.com DEFAULT_CLIENT_SECRET = 7uO7XXXXXXXXXXXXXX7dKBAP # The AdWords API OAuth2 scope. SCOPE = u'https://www.googleapis.com/auth/adwords' # The redirect URI set for the given Client ID. The redirect URI for Client ID # generated for an installed application will always have this value. _REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob' parser = argparse.ArgumentParser(description='Generates a refresh token with '                                  'the provided credentials.') parser.add_argument('--client_id', default=DEFAULT_CLIENT_ID,                     help='Client Id retrieved from the Developer\'s Console.') parser.add_argument('--client_secret', default=DEFAULT_CLIENT_SECRET,                     help='Client Secret retrieved from the Developer\'s '                     'Console.') parser.add_argument('--additional_scopes', default=None,                     help='Additional scopes to apply when generating the '                     'refresh token. Each scope should be separated by a comma.') class ClientConfigBuilder(object):   """Helper class used to build a client config dict used in the OAuth 2.0 flow.   """   _DEFAULT_AUTH_URI = 'https://accounts.google.com/o/oauth2/auth'   _DEFAULT_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token'   CLIENT_TYPE_WEB = 'web'   CLIENT_TYPE_INSTALLED_APP = 'installed'   def __init__(self, client_type=None, client_id=None, client_secret=None,                auth_uri=_DEFAULT_AUTH_URI, token_uri=_DEFAULT_TOKEN_URI):     self.client_type = client_type     self.client_id = client_id     self.client_secret = client_secret     self.auth_uri = auth_uri     self.token_uri = token_uri   def Build(self):     """Builds a client config dictionary used in the OAuth 2.0 flow."""     if all((self.client_type, self.client_id, self.client_secret,             self.auth_uri, self.token_uri)):       client_config = {           self.client_type: {               'client_id': self.client_id,               'client_secret': self.client_secret,               'auth_uri': self.auth_uri,               'token_uri': self.token_uri           }       }     else:       raise ValueError('Required field is missing.')     return client_config def main(client_id, client_secret, scopes):   """Retrieve and display the access and refresh token."""   client_config = ClientConfigBuilder(       client_type=ClientConfigBuilder.CLIENT_TYPE_WEB, client_id=client_id,       client_secret=client_secret)   flow = InstalledAppFlow.from_client_config(       client_config.Build(), scopes=scopes)   # Note that from_client_config will not produce a flow with the   # redirect_uris (if any) set in the client_config. This must be set   # separately.   flow.redirect_uri = _REDIRECT_URI   auth_url, _ = flow.authorization_url(prompt='consent')   print('Log into the Google Account you use to access your AdWords account '         'and go to the following URL: \n%s\n' % auth_url)   print('After approving the token enter the verification code (if specified).')   code = input('Code: ').strip()   try:     flow.fetch_token(code=code)   except InvalidGrantError as ex:     print('Authentication has failed: %s' % ex)     sys.exit(1)   print('Access token: %s' % flow.credentials.token)   print('Refresh token: %s' % flow.credentials.refresh_token) if __name__ == '__main__':   args = parser.parse_args()   configured_scopes = [SCOPE]   if not (any([args.client_id, DEFAULT_CLIENT_ID]) and           any([args.client_secret, DEFAULT_CLIENT_SECRET])):     raise AttributeError('No client_id or client_secret specified.')   if args.additional_scopes:     configured_scopes.extend(args.additional_scopes.replace(' ', '').split(','))   main(args.client_id, args.client_secret, configured_scopes) 

When I run the above code, I am getting the "Invalid Syntax" error highlighting at the numeric part of the Client ID and Secret.

Syntax error screenshot attached here

Editor Highlighter screenshot attached here