title: Google Indexing API Batch Request AttributeError: 'Resource' object has no attribute 'events'
body: <p>I am trying to use the Google Indexing BATCH Requests but it's not working. What am I doing wrong?</p>
  <p>Here is my code: There's no proper documentation, So I have modified it myself. However, It's generating errors.</p>
  <pre><code>from oauth2client.service_account import ServiceAccountCredentials
  from googleapiclient.http import BatchHttpRequest
  import httplib2
  from googleapiclient.discovery import build 
  SCOPES = [ &quot;https://www.googleapis.com/auth/indexing&quot; ]
  ENDPOINT = &quot;https://indexing.googleapis.com/v3/urlNotifications:publish&quot;
  
  # service_account_file.json is the private key that you created for your service account.
  JSON_KEY_FILE = &quot;service_account_file.json&quot;
  
  credentials = ServiceAccountCredentials.from_json_keyfile_name(JSON_KEY_FILE, scopes=SCOPES)
  
  service = build('indexing', 'v3', credentials=credentials)
  
  def insert_event(request_id, response, exception):
      if exception is not None:
        print(exception)
      else:
        print(response)
  
  batch = BatchHttpRequest(callback=insert_event)
  batch.add(service.events().quickAdd(url=&quot;URL HERE&quot;, type=&quot;URL_UPDATED&quot;))
  batch.add(service.events().quickAdd(url=&quot;URL HERE&quot;, type=&quot;URL_UPDATED&quot;))
  batch.execute(http=http)
  </code></pre>
  <p>ERROR:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;c:\Users\Sofia\Downloads\ss.py&quot;, line 23, in &lt;module&gt;
      batch.add(service.events.quickAdd(url=&quot;https://jobsinwales.org/jobs/united-kingdom-jobs/co-225/&quot;, type=&quot;URL_UPDATED&quot;))
  AttributeError: 'Resource' object has no attribute 'events'
  </code></pre>