-1

We followed all the instructions below, however, are now coming up with an error: 'Not enough permissions to access'. A search on stack overflow (where the support articles are kept) told us the following: Any queries to the api.linkedin.com/v2/ return "Not enough permissions to access ..."

Could anyone assist with the above. We have tried LinkedIn support and to be honest, they are useless. It's taken us 5 days to get a basic response from someone called 'Anu'.

Instructions we followed

https://www.linkedin.com/developers/apps/ - The app needs to be added when logged in to your LinkedIn account https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin?context=linkedin/consumer/context New members will need to follow the Authenticating with OAuth 2.0 Guide

https://learn.microsoft.com/en-us/linkedin/shared/authentication/authentication?context=linkedin/consumer/context 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. Follow one of the two authorization flows in Permissions to get started. https://learn.microsoft.com/en-us/linkedin/shared/authentication/permissions?context=linkedin/context Member Authorization or Authorization Code Flow (3-legged authorization): A LinkedIn member grants permissions to your application to access the member's resources on LinkedIn. Use this flow if you are requesting access to a member's account to use their data and make requests on their behalf. https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/context

We run job board and all we want is for our candidates to be able to signin with LinkedIn.

1 Answers1

0

Please check the app has these default permissions

r_liteprofile,r_emailaddress,w_member_social.

Below endpoint will help you for authorization.

$params = array('response_type' => 'code',
            'client_id' => $this->api_key,
            'scope' => $this->scope ,// these are the three permissions
            'state' => uniqid('', true), // unique long string
            'redirect_uri' => 'redirect url',
        );
        // Authentication request
        $url = 'https://www.linkedin.com/oauth/v2/authorization?' . http_build_query($params);
        header("Location: $url");

You can request for the accesstoken with state code return from the above EP.

augustine jenin
  • 424
  • 4
  • 10