1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] How to get the Linkedin page posts metrics with Pages Data Portability API

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024 às 11:53.

  1. Stack

    Stack Membro Participativo

    I already have the LinkedIn Pages Data Portability API access, the client ID, client secret, and access token, but still can't get the page post metrics such as impressions, interactions, and comments etc.......does anyone have an idea?

    Oauth 2.0 Scopes(Permissions):

    r_dma_admin_pages_content:

    Retrieve your organization's posts, newsletters, articles, and live videos, including any comments, reactions, and other engagement data.
    Retrieve your organization's social action data (e.g., likes, comments), messages, page follows, and other activity data.
    Retrieve your organization's lead gen forms, lead gen form responses, and leads analytics
    Retrieve your organization's pages and their reporting data (including follower, visitor, content, and other analytics).
    Use your basic profile including your name, photo, headline, and public profile URL.


    I already read the document here:

    https://learn.microsoft.com/en-us/l...iew=li-dma-data-portability-2024-05&tabs=http,

    and also tried the linkedin developer api with postman:

    https://www.postman.com/linkedin-de...-batch-get-200-1-opt-in-org-post-share-author

    with the headers:

    headers = {
    'X-Restli-Protocol-Version': '2.0.0',
    'Authorization':'Bearer '+ access_token,
    'X-RestLi-Method': 'GET'}

    request_url = "api.linkedin.com/v2/dmaPosts?ids=List({list_urn})&viewContext=READER"


    But it doesn't work. I always got response 401.

    if I use "api.linkedin.com/rest/dmaPosts?ids=List({list_urn})&viewContext=READER" then get the response 400

    Dose anyone have experience with Pages Data Portability API? How did you get the post metrics?

    Continue reading...

Compartilhe esta Página