Authorization

LinkedIn Marketing
Prerequisites
Before creating a LinkedIn Marketing credential, you need to create a LinkedIn application in the LinkedIn Developer Portal to obtain OAuth2 credentials. The OAuth2 credentials are required to authenticate with the LinkedIn Marketing API using OAuth2 authorization code flow.
To obtain your OAuth2 credentials, follow these steps:
-
Sign in to your LinkedIn account and navigate to the LinkedIn Developer Portal.
-
Click Create app to create a new LinkedIn application. Provide a name for your application and accept the LinkedIn API Terms of Use.
-
In your application settings, navigate to the Auth tab to view your OAuth2 credentials:
- Client ID: This is automatically generated and is required for LinkedIn Marketing API authentication. Copy this value as you will need it for your credential.
- Client Secret: This is also automatically generated. Click Show to reveal the Client Secret, then copy it immediately as you will need it for your credential.
-
Configure the OAuth2 redirect URI. In the Auth tab, add the redirect URI that Nexla will use for the OAuth2 flow. The redirect URI is typically provided by Nexla during the credential creation process.
-
Store the Client ID and Client Secret securely, as you will need them to configure your Nexla credential.
The Client ID and Client Secret are used for OAuth2 authentication with the authorization code flow. This authentication method requires user interaction to grant permissions to Nexla to access your LinkedIn Marketing data. The OAuth2 flow will redirect you to LinkedIn's authorization page where you'll sign in and grant permissions. After authorization, Nexla will automatically obtain and store the access token and refresh token needed to authenticate API requests. The LinkedIn Marketing API provides access to various marketing resources including organization information, share statistics, and page statistics. For detailed information about OAuth2 credential setup, authentication flows, and available API endpoints, refer to the LinkedIn Developer Portal, LinkedIn Marketing API documentation, and LinkedIn OAuth2 documentation.
Create a LinkedIn Marketing Credential
- To create a new LinkedIn Marketing credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
New Credential Overlay – LinkedIn Marketing

Credential Name & Description
-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
Resource descriptions are recommended but are not required. They should be used provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.
OAuth2 Authentication
LinkedIn Marketing uses OAuth2 authentication with the authorization code flow to securely access the LinkedIn Marketing API. OAuth2 is an industry-standard authorization protocol that allows applications to access user data without requiring users to share their passwords.
-
Click the Authorize button to begin the OAuth2 authorization flow. This will redirect you to LinkedIn's authorization page where you will be asked to sign in with your LinkedIn account and grant permissions to Nexla to access your LinkedIn Marketing data.
During the OAuth2 authorization flow, you will be redirected to LinkedIn's authorization page. You must sign in with a LinkedIn account that has access to the LinkedIn organization you want to connect. After signing in, you will be asked to grant permissions to Nexla to access your LinkedIn Marketing data. The default scopes provide access to LinkedIn Marketing API resources, including organization information, share statistics, and page statistics. Once you grant permissions, you will be redirected back to Nexla, and the authorization will be completed automatically.
-
After completing the OAuth2 authorization flow, Nexla will automatically obtain and store the access token and refresh token needed to authenticate API requests. The access token is used to authenticate each API request, and the refresh token is used to obtain new access tokens when the current access token expires.
OAuth2 access tokens expire after a certain period for security reasons. Nexla automatically refreshes expired access tokens using the refresh token, so you typically do not need to re-authorize unless you revoke access or the refresh token expires. The access token is sent in the
Authorization: Bearer {access_token}header for all API requests to the LinkedIn Marketing API. For detailed information about LinkedIn Marketing API authentication, token management, and available endpoints, see the LinkedIn Marketing API documentation and LinkedIn OAuth2 documentation.
Save the Credential
-
Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.
-
The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.