4. Look up the ad accounts organization Copy
GET {{baseUrl}}/adAccounts/{{sponsoredaccount_id}}?fields=referenceInfo
Pulling leads from an ad account requires the user to also have an appropriate role in the ad account's associated organization/company page. The following example uses the adAccounts endpoint to look up the ad account's associated organization (the field name we care about is id) which will be used in the next step to validate the user's role.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
fields | string |
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
Authorization | string | ||
LinkedIn-Version | string | ||
X-Restli-Protocol-Version | string |
RESPONSES
status: OK
{"referenceInfo":{"organization":{"name":{"localized":{"en_US":"Expedited LLC"},"preferredLocale":{"country":"US","language":"en"}},"vanityName":"Expedited-llc","localizedName":"Expedited LLC","id":11223344}}}