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

Only textAds available #48

Open
AndriiMaksiuta opened this issue Oct 6, 2023 · 0 comments
Open

Only textAds available #48

AndriiMaksiuta opened this issue Oct 6, 2023 · 0 comments

Comments

@AndriiMaksiuta
Copy link

Hi! I have been testing LinkedIn advertisement API, created several campaign groups, campaigns and ads of all kinds of Ads. However, client only returns textAds campaigns and their ads (creatives) respectively. However, all campaign groups are present in response, even those that did not contain any textAds.

How can I retrieve other ads (creatives: video, image, message, document, carousel, etc.)?

Here is how I retrieving campaigns by campaign group id:

       search = (
            {
                "campaignGroup": {
                    "values": [
                        f"urn:li:sponsoredCampaignGroup:{campaign_group_id}"
                        for campaign_group_id in campaign_group_ids
                    ]
                },
                "id": {"values": ids},
            }
            if ids
            else {
                "campaignGroup": {
                    "values": [
                        f"urn:li:sponsoredCampaignGroup:{campaign_group_id}"
                        for campaign_group_id in campaign_group_ids
                    ]
                },
            }
        )

        response = self.api_client.finder(
            resource_path=f"/adAccounts/{account_id}/adCampaigns",
            finder_name="search",
            access_token=access_token,
            version_string=self.api_version,
            query_params={
                "search": search,
            },
        )
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

1 participant