I am trying to pull data from Google Ads API to get campaign data without using OAuth Scopes and by just using a service account. Though I have put all the service account credential in my yaml file, I am getting "The Google account (@gmail.com user) that generated the OAuth access tokens is not associated with any Ads accounts." PLEASE HELP:)

CODE:

    from google.ads.googleads.client import GoogleAdsClient     from google.oauth2.service_account import Credentials     def get_campaigns_with_service_account(path_to_credential_file):   """Retrieves a list of campaigns using a service account.   Args:       client_id: The client ID of your Google Ads API credentials.       client_secret: The client secret of your Google Ads API credentials (optional).       refresh_token: The refresh token for your Google Ads API credentials (optional).       developer_token: The developer token for your Google Ads API project.       path_to_credential_file: The path to your service account key file in JSON format.   """   # Configure service account credentials   credentials = Credentials.from_service_account_file(       path_to_credential_file,       scopes=['https://www.googleapis.com/auth/adwords'],  # Adjust scopes as needed   )   # Create Google Ads client using service account credentials   client =GoogleAdsClient.load_from_storage("/content/drive/My Drive/Keys/google-ads.yaml")   ga_service = client.get_service("GoogleAdsService", version="v16")  # Use CampaignService   # Create a query to retrieve all campaigns   query = ("SELECT campaign.id, campaign.name, campaign.status "            "FROM campaign")   # Get a response with campaign information   customer_id = 'XXXXXX'  # Replace with your actual customer ID   def stream_response(client, customer_id, query):     return client.get_service("GoogleAdsService", version="v16").search_stream(customer_id=customer_id,       query=query)` ` 

MY YAML FILE:

`# Developer token ########################################################################################## # A developer token is required when making requests to the Google Ads API regardless of # # whether you're using the OAuth2 or Service Account configurations. To obtain a         # # developer token see:                                                                   # # https://developers.google.com/google-ads/api/docs/first-call/dev-token                 # ##########################################################################################     developer_token: {{token}} # Use proto plus ########################################################################################## # This parameter specifies whether the client library should return proto-plus messages  # # or protobuf messages. This value should be explicitly set to either "True" or "False", # # For more information on the differences between these two types, see our Protobuf      # # Messages guide:                                                                        # # https://developers.google.com/google-ads/api/docs/client-libs/python/protobuf-messages # ##########################################################################################     use_proto_plus: False # OAuth2 configuration ########################################################################################## # The below configuration parameters are used to authenticate using the recommended      # # OAuth2 flow. For more information on authenticating with OAuth2 see:                   # # https://developers.google.com/google-ads/api/docs/oauth/overview                       # ########################################################################################## #client_id: INSERT_ID_HERE #client_secret: INSERT_SECRET_HERE #refresh_token: INSERT_REFRESH_TOKEN_HERE # Service Account configuration ########################################################################################## # To authenticate with a service account add the appropriate values to the below         # # configuration parameters and remove the three OAuth2 credentials above. The            # # "json_key_file_path" value should be a path to your local private key json file, and   # # "impersonated_email" should be the email address that is being used to impersonate the # # credentials making requests. for more information on service accounts, see:            # # https://developers.google.com/google-ads/api/docs/oauth/service-accounts.              # # If you're authorizing with direct account access, then the "impersonated_email"        # # configuration is optional.                                                             # ##########################################################################################     json_key_file_path: /content/drive/My Drive/Keys/winged-woods-421416-bcf06a74b272.json     impersonated_email: api-creds@winged-woods-xxx.iam.gserviceaccount.com # Login customer ID configuration ########################################################################################## # Required for manager accounts only: Specify the login customer ID used to authenticate # # API calls. This will be the customer ID of the authenticated manager account. It       # # should be set without dashes, for example: 1234567890 instead of 123-456-7890. You can # # also specify this later in code if your application uses multiple manager account +    # # OAuth pairs.                                                                           # ########################################################################################## login_customer_id: XXXXXXXX # Logging configuration ########################################################################################## # Below you may specify the logging configuration. This will be provided as an input to  # # logging.config.dictConfig. Use the "level" block under the root logger configuration   # # to adjust the logging level. Note in the "format" field that log messages are          # # truncated to 5000 characters by default. You can change this to any length by removing # # the ".5000" portion or changing it to a different number.                              # # ######################################################################################## # logging:   # version: 1   # disable_existing_loggers: False   # formatters:     # default_fmt:       # format: '[%(asctime)s - %(levelname)s] %(message).5000s'       # datefmt: '%Y-%m-%d %H:%M:%S'   # handlers:     # default_handler:       # class: logging.StreamHandler       # formatter: default_fmt   # loggers:     # "":       # handlers: [default_handler]       # level: INFO # Proxy configuration ########################################################################################## # Below you can specify an optional proxy configuration to be used by requests. If you   # # don't have username and password, just specify host and port.                          # # ######################################################################################## # http_proxy: http://user:password@localhost:8000` 
 OUTPUT: FaultMessage: The Google account (@gmail.com user) that generated the OAuth access tokens is not associated with any Ads accounts. Create a new account, or add the Google account to an existing Ads account.   message: "The Google account (@gmail.com user) that generated the OAuth access tokens is not associated with any Ads accounts. Create a new account, or add the Google account to an existing Ads account." } 

I find the Facebook developers API documentation a bit confusing. I'm building a small app using PHP and I would like to fetch/scrape data from a page which isn't belong to me.

is it possible using the API or i will need to scrape the data manually? If it's possible, is it possible if i'm not the owner of the page as well?

The Insights endpoint of Marketing API returns HTTP 500.
Example request https://graph.facebook.com/v19.0/ACT_120300765059980/insights?time_increment:1&time_range:{"since":"2023-01-01","until":"2024-05-07"}&fields:["campaign_id","impressions","clicks","spend"]& limit:2000
Example session of Graph API explorer https://developers.facebook.com/tools/explorer/625394586410842/?session_id=1973099666421556
Example fb-trace-id AJw-Ja8_vSyO9bfi4LpVDIe
The returned data suggests this is a transient error, but this error persists for at least four hours. Aything wrong on my side? Or is the API in error for an unexpected long time?
One more observation: requests to the campaigns endpoint have no problems at all.

i try to create an adgroup by REST api request. payload is this {"operations":[{"create":{"status":"ENABLED","name":"Adset","type":"DISPLAY_STANDARD","campaign":"customers/id/campaigns/id","optimizedTargetingEnabled":true,"audienceSetting":{"useAudienceGrouped":true}}}]}

{"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure","errors":[{"errorCode":{"contextError":"OPERATION_NOT_PERMITTED_FOR_CONTEXT"},"message":"The operation is not allowed for the given context.","trigger":{"stringValue":"DISPLAY"},"location":{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"audience_setting"},{"fieldName":"use_audience_grouped"}]}}],"requestId":""}]}}

I have a question about creating an advertising campaign. I've searched through a lot of information and tried many times without success, so I have to seek help here.
When I try to create an advertising campaign, I'm prompted with "You can’t create a new campaign with this iTunes App ID as it’s already being used." I did indeed use the same iTunes App ID to create a Facebook app in the developer account before. However, I can't log in to that account anymore, so I can't delete the binding relationship between the app and the iTunes App ID. I'd like to know if there's a way to revoke the authorization of other Facebook apps for this iTunes App ID. I can provide all the evidence to prove my absolute ownership of this iOS app (iTunes App ID). Thank you!