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

New Source: Linkedin Ads #2589

Closed
sherifnada opened this issue Mar 23, 2021 · 5 comments · Fixed by #5285
Closed

New Source: Linkedin Ads #2589

sherifnada opened this issue Mar 23, 2021 · 5 comments · Fixed by #5285

Comments

@sherifnada
Copy link
Contributor

sherifnada commented Mar 23, 2021

Tell us about the new integration you’d like to have

Linkedin Ads/Marketing

Endpoints

todo

┆Issue is synchronized with this Asana task by Unito

@cheyura
Copy link

cheyura commented Jun 7, 2021

Webhook-based? (no/partially/yes)
No

Available authentication modes (API key/Oauth/other)
The LinkedIn API uses OAuth 2.0 for user authorization and API authentication. Applications must be authorized and authenticated before they can fetch data from LinkedIn or get access to member data.

Creating an account

Free LinkedIn Account. LinkedIn Premium Career: $29.99/month. LinkedIn Premium Business: $59.99/month

Before you begin an advertising campaign on LinkedIn, you will need the following:

  • LinkedIn Company Page: This is your organization
  • Developer App: Create your application
  • Approved Marketing Access: Apply for access on the products tab when you create your app:This process is not instantaneous, and may take one or more days for approval
  • OAuth 2.0 access token with rw_ads Permission Scope.

Has Sandbox environment ?
Yes. LinkedIn provides the ability to create a test ad account for you to develop, test, and demo your integration. A test ad account provides several benefits, including the ability to create test ads via the API which will never be served and will not require billing.

Follow these steps to set up your test ad account:

Create a test ad account using the /adAccountsV2 endpoint. Include an additional boolean parameter test to indicate this is a test ad account. Note that you can only create one test ad account per developer application.
Using the test ad account, perform other actions like creating and updating ads and creatives as you normally would.
Please note these behaviors in test ad accounts:
All creatives created under a test ad account will never be served in production.
Creatives under the test ad account will be auto-rejected in the review process.
Test campaigns do not require billing details or incur any costs.
No reporting data is available from /adAnalyticsV2 for test campaigns as they do not get served.
Reporting data is not available because impressions do not occur under a test account and no social actions can be measured.
Test accounts do not support Audience segment upload.
Only business accounts support test ad accounts. Test enterprise ad accounts are not available.
You cannot create a test ad account in Campaign Manager. You must create a test ad account using an API endpoint.

How to populate the account with data?
It can be done through the UI (Campaign Manager), API, Sandbox API.

Available streams for sync
PRODUCTS (Consumer, Marketing, Learning) and SERVICES (Posts, Ad Accounts, Campaign management.)

Integration supports incremental sync?
No

Other information/blockers
API access tiers: https://docs.microsoft.com/en-us/linkedin/marketing/integrations/marketing-tiers
Before you begin an advertising campaign on LinkedIn, you will need the following:

  • LinkedIn Company Page: This is your organization
  • Developer App: Create your application
  • Approved Marketing Access: Apply for access on the products tab when you create your app:This process is not instantaneous, and may take one or more days for approval
  • OAuth 2.0 access token with rw_ads Permission Scope.

@cheyura
Copy link

cheyura commented Jun 14, 2021

@sherifnada min budget 10usd per day

@airbytehq airbytehq deleted a comment from cheyura Jun 22, 2021
@gr00tie
Copy link

gr00tie commented Jun 29, 2021

Would love to see this one upvoted. It currently is blocking us from using Airbyte.

@sherifnada
Copy link
Contributor Author

@cheyura let's start a campaign in preparation to implement.

@bazarnov bazarnov assigned bazarnov and unassigned antixar and cheyura Aug 6, 2021
@bazarnov
Copy link
Collaborator

bazarnov commented Aug 6, 2021

@sherifnada

While deep scoping of the development process (API Endpoints, flow, access, permissions, authentication and refresh tokens, etc) I would like to admit couple of moments that are important:

  • The Customer needs to created the real development application and apply & pass to the 'Marketing Developer Platform' in order to have the access to the LinkedIn Ads API, otherwise the connector would not work. This process is described in Marketing section HERE

  • Auth type: only OAuth 2.0 with redirect_url required. No other options.
    This causes some difficulties with the obtaining access_token for the customer, but not that hard to follow, if we provide proper instructions inside connector documentation. Probably this moment could be less hard if the connector will be available for Cloud Airbyte (enter the minimal credentials needed for the connector and follow the instructions such as: redirect to the LinkedIn > Login > Allow > get the grant auth_code) as described HERE

  • Access_token: using the grant_auth_code obtained from permanent authentication process , we need to send the POST and obtain the access_token, normally the response doesn't have the refresh_token inside, to have the refresh_token, the customer's development application should have the specific rights for that. granted by LinkedIn Review Team, as documented HERE.
    Otherwise the access_token is expired in a 2 month from the date it's obtained, and should be regenerated by repeating the process of grant authentication process, as described HERE

This connector matches the Cloud Airbyte perfectly (with it's ability to redirections), but the local use-cases of Airbyte could face with problems of access_token expiration after 2 month of usage. We could handle that by proper documentation guides, however it's could be confusing for the Customer and might require any additional support for each individual case (probably over slack channels)

@sherifnada
If you have any concerns or a questions about the implementation process, let's discuss them.

UPDATE:
The refresh token problem could be resolved, by programatically login into the LinkedIn (using Customer's email + password in the config) before we obtain the grant_auth_code, this gives us the possibility to bypass redirection and send the request for access_token without giving the permissions for developer's app, assuming we already logged in and simply want to have the access token.
This approach requires usage of BeautifulSoup library in order to pass the login information to the requests.Session.

Basically, each time the Customer starts sync, the login sessions is performed > obtained the grant_auth_code > obtained the access_token process takes place, and this access_token is valid for 2 month, when the new sync is triggered.
We bypass the need of refresh_token in this case at all. It's never should be a case for the Customer.

UPDATE:
The programatic login works, for first 50 connections, after that the. LinkedIn endpoint redirects you for additional verification, using captcha. Also, there are some concerns about Two-Step-Verification, if it's enabled the whole process is failed. So this method works as expected, but it's not robust enough for the implementation.

Is there any way we can implement the redirection pop-up window on the stage of connection set-up, specifically for the cases with OAuth2.0 + redirection_uri?

@bazarnov bazarnov linked a pull request Aug 9, 2021 that will close this issue
17 tasks
bazarnov added a commit that referenced this issue Sep 24, 2021
Resolving: #2589

Co-authored-by: Oleksandr Bazarnov <oleksandr.bazarnov@globallogic.com>
@sherifnada sherifnada moved this to Done in GL Roadmap Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants