Get Linkedin v2 Account Permissions - linkedin

There is an api to get if a Linkedin Account has permissions for getting adds ? Or in the profile information there is something that might be helpfull?
Because in my Application I want to know if the account has permission to do some logic or not.

Related

Google Analytics API Service User does not have sufficient permissions for this profile

I am using Google Analytics 4. I have created the json file for the service account, and got the email address. This email was added to my users as Admin in the Account Access Management, yet I am still getting the error that I do not have sufficient permissions for this profile.
Any idea what am I doing wrong please?

"Not enough permissions to access: GET-search /adCampaignGroups" while call the LinkedIn API with all existing permissions

I'm just trying to get all the campaign groups linked to an ad account via the https://api.linkedin.com/rest/adCampaignGroups?q=search&search API using Postman. But I get a 403 error "Not enough permissions to access: GET-search /adCampaignGroups".
I know I need the "r_ads" and "rw_ads" permissions, but I tried to generate an access_token with all permissions, and it still doesn't work.
My exact API call : https://api.linkedin.com/v2/adCampaignGroups?q=search&search.account.values=urn:li:sponsoredAccount:999999999
=> "999999999" is replaced by the real id of my ad account whose access-token is linked to a LinkedIn admin account (ACCOUNT_BILLING_ADMIN)
I don't understand how a token that has all the permissions, and an application that has all the LinkedIn products can receive a 403 code in this case
We had the same issue with the LinkedIn API. Their API documentation isn't completely up to date nor is it clear.
Our requests worked when we used the endpoints listed in the app. Make sure that when your app is still in a Development tier, that you link an existing ad account that you're an admin of to the app.
You can then use the endpoints like this:
https://api.linkedin.com/v2/adCampaignGroupsV2
This worked for us.

Unable to query to search company in linkedinAPI V2

My App has SignIn With linkedin and Share on Linkedin both permission assigned.
While retrieving the token, I have used the scope w_member_social as well.
But as per the Linked API documentation: while, I try to use the query to search organization by keywords, I am getting error as -
"serviceErrorCode":100,"message":"Not enough permissions to access: GET-search /companySearch","status":403
Can you tell me what extra permission is needed here ?
I think you need the rw_organization_admin permission. Actually you have a write-only permission and maybe this is the problem.
Moreover the LinkedIn API states that "The Company Search endpoint is restricted. This permission is granted to selected developers only."(as reported here)

Analytics Google API Error 403: “User does not have any Google Analytics Account”

Hi generated secret file using OAuth 2.0 client ID. In that secret file, I do not see any google mail address to authenticate or access permissions to that mail address. Still facing below error.
Arg, there was an API error : 403 : User does not have sufficient permissions for this profile.
How come I know, to which user, we do not have sufficient previliges?
Please help me with this
You have created an Oauth2 client for use with your application. When the application runs a user will need to login using their Google account and grant the application (client) access to their data. I have an article that explains how google oauth2 works if you are interested. Oauth2 for beginners
User does not have sufficient permissions for this profile.
Means that the user you have authenticated with does not have access to the Google Analytics profile you are trying to request data form. Try doing an Accountsummires.list this will return a list of the Google Analytics accounts that the current authenticated user has access to and the ones you will be able to request data from.
Question: How come I know, to which user, we do not have sufficient privileges?
You have a profile id you are trying to access find someone who has access to that profile and have them run your application. When they have logged in and authenticated they will be able to see the data.

LinkedIn API returns 403 when requesting companies list

We use the LinkedIn API to list companies that a user admins.
We have our App set to get r_fullprofile and rw_company_admin when the user grants permission.
We're trying to list all of the companies the user has admin access to via:
http://api.linkedin.com/v1/companies:(id,name,square-logo-url)?is-company-admin=true
<error>
<status>403</status>
<timestamp>1432323149224</timestamp>
<request-id>XXXXXXXXXX</request-id>
<error-code>0</error-code>
<message>Member [user id] does not have permission to get companies as admin.</message>
</error>
According to the Manage Company Pages docs, as long as we have the rw_company_admin scope, we should be able to call this endpoint.
I've read through the Developer Program Transition docs (https://developer.linkedin.com/support/developer-program-transition) but it doesn't seem to affect this usage of the API.
ETA: This has been flagged as a possible duplicate of LinkedIn API unable to view _any_ company profile
That question is about fetching details for a single company (which the user may or may not administrate). My question is about listing companies that the user specifically does administrate.
According to new api changes user should be administrator of target company. Read this .
All calls to Companies API endpoints will require the authenticated user to be flagged as an administrator of the LinkedIn Company Page that is the target of the API call. You become the administrator of a page when you create it. If the page already exists, you will have to contact the existing administrator to grant admin access to other LinkedIn members.
I faced the same problem and the problem was with the initial authorization code. You should mention the scope=rw_company_admin while doing the initial redirect URL call. Something like this -
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=your_client_id&redirect_uri=https%3A%2F%2Fwww.google.com/&state=12345&scope=rw_company_admin%20r_emailaddress%20w_share%20r_basicprofile

Resources