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

KeyDatatypeRequiredDescription
fieldsstring

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring
LinkedIn-Versionstring
X-Restli-Protocol-Versionstring

RESPONSES

status: OK

{"referenceInfo":{"organization":{"name":{"localized":{"en_US":"Expedited LLC"},"preferredLocale":{"country":"US","language":"en"}},"vanityName":"Expedited-llc","localizedName":"Expedited LLC","id":11223344}}}