Internal API Error when calling campaign service.

51 views
Skip to first unread message

Petros Dawit

unread,
Jun 13, 2019, 8:52:26 PM6/13/19
to AdWords API and Google Ads API Forum
Here is a snippet of my code:

                campaign_service = self.get_service(CAMPAIGN_SERVICE)
                parameters = [
                    {
                        'key': 'refcode',
                        'value': refcode
                    }
                ]
                campaign_operations = []

                for campaign in campaigns:
                    campaign_operations.append({
                        'operator': 'SET',
                        'operand': {
                            'name': campaign,
                            'urlCustomParameters': {'parameters': parameters}
                        }
                    })
                response = campaign_service.mutate(campaign_operations)
                return response


The campaigns is a list of valid campaigns which are serving. I have used this code before and it has made the changes.
Only now when I call, it is giving me the InternalApiError.UNEXPECTED_INTERNAL_API_ERROR. I don't know why this is the case.

Thanks

Google Ads API Forum Advisor Prod

unread,
Jun 14, 2019, 10:14:59 AM6/14/19
to petros...@gmail.com, adwor...@googlegroups.com
Hi Petros, 

The UNEXPECTED_INTERNAL_API_ERROR could be due to a transient issue. Can you retry the API request again and see if you're noticing this issue? If the request is failing, could you please share the API SOAP logs which includes the requestId, complete request and response so that I can take a look? Please check the README section of the respective client library for guidance on how to enable logging. You can reply back via Reply privately to author option.

Thanks,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UBnFtf:ref

Petros Dawit

unread,
Jun 14, 2019, 11:30:33 AM6/14/19
to AdWords API and Google Ads API Forum
Hi,

I just sent you my logs privately.

Thanks for your help,
Petros

Petros Dawit

unread,
Jun 14, 2019, 11:51:31 AM6/14/19
to AdWords API and Google Ads API Forum
Also, if there is another way for changing urlCustomParameters for a campaign, can you please let me know. This is a little time sensitive.

Thanks,
Petros

On Friday, June 14, 2019 at 7:14:59 AM UTC-7, adsapiforumadvisor wrote:

Google Ads API Forum Advisor Prod

unread,
Jun 14, 2019, 5:24:26 PM6/14/19
to petros...@gmail.com, adwor...@googlegroups.com
Hello Petros, 

Thank you for sharing the request. Could you please share the response logs which includes the request Id to check this further? I was able to update the URLCustomParameters using the CampaignService. Please find the attached SOAP logs as a reference. 

Regards,
Sample_Logs.rtf

Petros Dawit

unread,
Jun 14, 2019, 7:25:35 PM6/14/19
to AdWords API and Google Ads API Forum
Hi, I jsut tested it again and it works now. Is there a health dashboard or something to check if some services within Google are having issues. it works now after not making changes.

Google Ads API Forum Advisor Prod

unread,
Jun 17, 2019, 11:40:28 AM6/17/19
to petros...@gmail.com, adwor...@googlegroups.com
Hello Petros, 

The UNEXPECTED_INTERNAL_API_ERROR could be due to a transient issue. Retrying the API requests should work in most of the scenarios. You can check the status of the Google Ads Products here. If you're facing an issue, please write back to us and we will be happy to take a look. 

Thanks,
Reply all
Reply to author
Forward
0 new messages