0
>PS C:\Documents\YouTube\Code> python YouTubeRetrieveReports.py
>No jobs found
>Retrieved reports.

This is the only thing I get when running the sample script against the YouTube Reporting API to retrieve the reports that I've been creating. The documentation for errors with the Reporting API is limited, so I'm looking for any type of insight as to why my reporting jobs aren't being found.

I'm using Python 2.7 and have already enabled OAuth 2.0. I've waited the 48 hours that YouTube suggests jobs will be available by, and I've used the exact same code from the YouTube Reporting API samples.

Kevin
  • 113
  • 2
  • 8

1 Answers1

0

To retrieve list of reports, you need to use the Method jobs.reports.list. This method will generate list of reports for the specified reporting job.

HTTP request

GET https://youtubereporting.googleapis.com/v1/jobs/{jobId}/reports

Take note that All YouTube Reporting API requests must be authorized. The Authorization guide explains how to use the OAuth 2.0 protocol to retrieve authorization tokens.

If successful, the response body contains data with the following structure:

{
"reports": [
Report resource
],
"nextPageToken": string
}

You can use this sample which calls the jobs.list method to retrieve a list of reporting jobs. It then calls the reports.list method with the jobId parameter set to a specific job id to retrieve reports created by that job.

Android Enthusiast
  • 4,826
  • 2
  • 15
  • 30
  • I've read all of this on YouTube Reporting API's documentation, and already mentioned that I used the sample code you directed me to and had OAuth 2.0 working. I'm using the jobs.list method to list the jobs first just as the docs indicate, but even after successfully creating jobs there are still none found in the list when I'm using the methods you've specified from Google's documentation. – Kevin May 27 '16 at 17:17