ACCESS_DENIED while calling Posts API

Pavitra Desai 5 Reputation points
2024-01-19T09:45:11.3566667+00:00

I am a developer wanting to migrate Linkedin Ads to the latest Marketing January 2024 version. While migrating from Shares API to Posts API I am facing 'ACCESS_DENIED Not enough permissions to access: partnerApiPostsExternal.GET.20240101' error. While my access_token is valid and working for other accounts API like campaign, campaign_group, creative but not for Posts. Referred to https://learn.microsoft.com/en-us/linkedin/marketing/community-management/contentapi-migration-guide?view=li-lms-2024-01#share-api--posts-api

headers = {'x-li-format': 'json', 'Content-Type': 'application/json', 'X-Restli-Protocol-Version': '2.0.0', 'LinkedIn-Version': '202401'}
params = {'oauth2_access_token': my_valid_access_token}
requests.get('https://api.linkedin.com/rest/posts/urn%3Ali%3Ashare%{id}', headers=headers,params=params)

Please help me resolve this. Thank you!

Microsoft Advertising
Microsoft Advertising
A platform for Microsoft's advertising efforts designed to manage all advertising and reporting for partner advertisers. Previously known as Bing Ads and adCenter.
59 questions
0 comments No comments
{count} vote