Skip to content

hotfix for sb.list_products_targets#41

Merged
denisneuf merged 1 commit into
denisneuf:mainfrom
PastorJordi:main
Apr 29, 2022
Merged

hotfix for sb.list_products_targets#41
denisneuf merged 1 commit into
denisneuf:mainfrom
PastorJordi:main

Conversation

@PastorJordi
Copy link
Copy Markdown
Contributor

Thanks for creating and maintaining this repository. It has been really useful for me.

Yesterday I spent some minutes delving deep into the code and trying to get a successful request on sb/targets/list.
To make you aware of it and perhaps save someone else time, I am making a PR with a bypass.
I am pretty newbie to python and APIs so perhaps it is not an actual issue / it can be solved in a more graceful way.

Cheers,

Jordi

@denisneuf denisneuf merged commit 1bfb5bb into denisneuf:main Apr 29, 2022
@denisneuf
Copy link
Copy Markdown
Owner

Hola Jordi,
Thanks to pointing the problem, I tested the endopoint and get:
ad_api.base.exceptions.AdvertisingApiException: {'status_code': 415, 'message': 'Cannot consume content type'}
So even the Amazon docs mention a specific content-type as you mention it won't work unless the content type is left by default as a regular application/json.
Kindest Regards.
Daniel.

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

Successfully merging this pull request may close these issues.

2 participants