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

CRITICAL 400 Client Error: Bad Request for url: adDirectSponsoredContents #14

Open
Rodske opened this issue Nov 3, 2020 · 1 comment

Comments

@Rodske
Copy link

Rodske commented Nov 3, 2020

For a test of the request with Postman the payload returned from a url like ... https://api.linkedin.com/v2/adDirectSponsoredContents?start=0&count=100&q=account
was ..
{"message":"Parameter 'account' is required","status":400}

Is this a permissions issue or update to the LinkedIn schema?

Below is the error when running the tap directly ...
`INFO URL for video_ads: https://api.linkedin.com/v2/adDirectSponsoredContents?start=0&count=100&q=account
INFO METRIC: {"type": "timer", "metric": "http_request_duration", "value": 0.29259490966796875, "tags": {"endpoint": "video_ads", "http_status_code": 400, "status": "succeeded"}}
CRITICAL 400 Client Error: Bad Request for url: https://api.linkedin.com/v2/adDirectSponsoredContents?start=0&count=100&q=account
Traceback (most recent call last):
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads\client.py", line 65, in raise_for_error
response.raise_for_status()
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\requests-2.22.0-py3.9.egg\requests\models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.linkedin.com/v2/adDirectSponsoredContents?start=0&count=100&q=account

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\Projects\cba\tap-linkedin-ads.venv\Scripts\tap-linkedin-ads-script.py", line 33, in
sys.exit(load_entry_point('tap-linkedin-ads==1.0.1', 'console_scripts', 'tap-linkedin-ads')())
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\singer_python-5.8.1-py3.9.egg\singer\utils.py", line 229, in wrapped
return fnc(*args, **kwargs)
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads_init_.py", line 43, in main
sync(client=client,
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads\sync.py", line 577, in sync
total_records, max_bookmark_value = sync_endpoint(
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads\sync.py", line 308, in sync_endpoint
child_total_records, child_batch_bookmark_value = sync_endpoint(
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads\sync.py", line 226, in sync_endpoint
data = client.get(
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads\client.py", line 178, in get
return self.request('GET', url=url, path=path, **kwargs)
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\backoff-1.8.0-py3.9.egg\backoff_sync.py", line 94, in retry
ret = target(*args, **kwargs)
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads\client.py", line 173, in request
raise_for_error(response)
File "c:\Projects\cba\tap-linkedin-ads.venv\lib\site-packages\tap_linkedin_ads-1.0.1-py3.9.egg\tap_linkedin_ads\client.py", line 85, in raise_for_error
raise LinkedInError(error)
tap_linkedin_ads.client.LinkedInError: 400 Client Error: Bad Request for url: https://api.linkedin.com/v2/adDirectSponsoredContents?start=0&count=100&q=account
The output is valid.
It contained 7 messages for 2 streams.`

@paddie
Copy link

paddie commented May 26, 2021

funny, I've seen the same issue, but only for a single account of our many associated accounts. I've found no solution just yet.

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

2 participants