Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword Performance Report does not seem to work #7

Open
zben opened this issue Jan 2, 2019 · 0 comments
Open

Keyword Performance Report does not seem to work #7

zben opened this issue Jan 2, 2019 · 0 comments

Comments

@zben
Copy link

zben commented Jan 2, 2019

Keep getting error from the server. Did you verify that you can get keyword performance report using the code on the home page without issue for bing ads v12? Thanks!!

Error

E, [2019-01-02T02:44:40.490002 #12749] ERROR -- : (a:InternalServiceFault) The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
E, [2019-01-02T02:44:40.490111 #12749] ERROR -- : unexpected error
Savon::SOAPFault: (a:InternalServiceFault) The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
from /Users/benz/.rvm/gems/ruby-2.3.1/gems/savon-2.11.1/lib/savon/response.rb:85:in `raise_soap_and_http_errors!'

Note

application_token is not needed from Bing API documentation so I used nil value for it.
https://docs.microsoft.com/en-us/bingads/guides/get-started?view=bingads-12#request-headers

Sample code

Here is the code I was running, assuming the home page code is correct

developer_token =  <VALUE>
authentication_token = <VALUE> 
account_id = <VALUE>
customer_id = <VALUE>


service = BingAdsReporting::AdInsightService.new({developerToken:
developer_token,
applicationToken: nil, authenticationToken: authentication_token, accountId: account_id, customerId:
customer_id})

period = Datebox::Period.new('2018-07-01', '2018-07-03')
    id = service.generate_report({report_type: 'KeywordPerformance',
                                  report_format: 'Tsv',
                                  aggregation: 'Daily',
                                  aggregation_period: 'ReportAggregation::Daily',
                                  columns: %w[AccountId AccountName CampaignId CampaignName AdGroupId AdGroupName KeywordId Keyword DestinationUrl DeliveredMatchType AverageCpc CurrentMaxCpc AdDistribution CurrencyCode Impressions Clicks Ctr CostPerConversion Spend AveragePosition TimePeriod CampaignStatus AdGroupStatus DeviceType]},
                                  {period: period})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant