error AuthorizationError.USER_PERMISSION_DENIED in get report

67 views
Skip to first unread message

juk...@readyplanet.com

unread,
Aug 5, 2015, 9:01:02 AM8/5/15
to AdWords API Forum
when i get report follow:
$user = new AdWordsUser();

        $user->GetAuthToken();
        $user->SetClientCustomerId($sCurrentClientID);


        // Log SOAP XML request and response.
        $user->LogDefaults();

        // Load ReportDefinitionService so that the required classes are available.
        $user->LoadService('ReportDefinitionService', 'v201506');

        $today = date('Y-m-d', strtotime('monday this week'));
        $pathdir = "path";
        $fileName = "$pathdir/budgetPerformance.$sCurrentClientID.csv";
        
        $reportQuery = "SELECT CampaignName, Amount, TotalCost, CampaignStatus
                        FROM CAMPAIGN_PERFORMANCE_REPORT
                        WHERE CampaignStatus = 'ENABLED' AND TotalCost > 0 DURING LAST_WEEK";


        $options = array('version' => 'v201506');

        echo "downloading...\n";

        // Download report.
        ReportUtils::DownloadReportWithAwql($reportQuery, $fileName, $user, 'CSVFOREXCEL', $options);

and give exception that: 

Report download failed. Underlying errors are 
Type = 'AuthorizationError.USER_PERMISSION_DENIED', Trigger = '<null>', FieldPath = ''.

how to fix them. thank you 
---sorry for my bad english----

Umesh Dengale

unread,
Aug 5, 2015, 5:34:07 PM8/5/15
to AdWords API Forum
Hello,

Could you provide SOAP request and response logs? Just click Reply privately to author in the forum when responding. Don't forget to remove the developer token in the output.

Thanks,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages