Temitope Sam
07/26/2025, 11:10 AMkapa.ai
07/26/2025, 11:10 AM'POST' request to 'https://youtubereporting.googleapis.com/v1/jobs' failed with status code '400' and error message: 'Request contains an invalid argument.'. Request (body): 'b'{"name": "Airbyte reporting job", "reportTypeId": "channel_basic_a2"}''. Response (body): '{'error': {'code': 400, 'message': 'Request contains an invalid argument.', 'status': 'INVALID_ARGUMENT'}}'. indicates that the YouTube Reporting API rejected the request to create a reporting job, likely due to an invalid or missing argument in the request body. Based on the knowledge sources, here are some possible causes and troubleshooting steps: 1. Inactive or Invalid YouTube Channel If your YouTube channel is inactive (no viewers, comments, or posts), the API may return errors when trying to create reporting jobs. Users have reported that adding an active channel works, while inactive channels result in similar errors. Try using a YouTube account with recent activity or ensure your channel is active before attempting to sync. Manually creating a reporting job via the API (using curl or similar tools) has also helped in some cases, especially for inactive channels. If the API returns an empty response for jobs or reports, this can trigger the error you are seeing [[source-youtube-analytics] Issue with the youtube analytics connector](https://github.com/airbytehq/airbyte/issues/44406). 2. Incorrect or Missing Arguments Double-check that the reportTypeId you are using (channel_basic_a2) is valid for your account and that your account has the necessary permissions. The list of supported report types is available in the [YouTube Reporting API documentation](https://developers.google.com/youtube/reporting/v1/reports/channel_reports#video-user-activity) and in the Airbyte docs. Make sure you are using the correct reportTypeId for your channel type and that your account is authorized with the required scopes [[YouTube Analytics](https://docs.airbyte.com/integrations/sources/youtube-analytics#youtube-analytics)]. 3. Authorization and Permissions Ensure that the Google account you are using has the correct permissions (at least "Manager" rights on the YouTube channel) and that you have authorized the required OAuth scopes (`https://www.googleapis.com/auth/yt-analytics.readonly`). If you are using a brand account, there may be additional complications, as some users have reported issues authenticating with brand accounts [[Error in Source Connector "YouTube Analytics: "The YouTube account is not valid."](https://github.com/airbytehq/airbyte/discussions/44582)]. 4. API Quirks and Manual Job Creation In some cases, manually creating a reporting job via the API before setting up the Airbyte source has resolved the issue. This suggests that Airbyte may not always be able to create the job automatically, especially for new or inactive channels [[source-youtube-analytics] Issue with the youtube analytics connector](https://github.com/airbytehq/airbyte/issues/44406). Summary of steps to try: - Make sure your YouTube channel is active. - Confirm your account has the correct permissions and is not a brand account (or follow the extra steps for brand accounts). - Manually create a reporting job for the desired report type using the YouTube Reporting API, then try syncing again. - Double-check the reportTypeId and all request parameters. If you continue to experience issues after these steps, please provide more details about your channel status and account type, as these factors have been shown to affect the connector's ability to create reporting jobs.