我怎样才能找出“没有足够的权限来访问:GET /me”错误?

问题描述 投票:0回答:1

我正在尝试使用 socialite package 在我的 Laravel 应用程序上添加 LinkedIn 身份验证。但我收到以下错误:

Client error: `GET https://api.linkedin.com/v2/me?projection=%28id%2CfirstName%2ClastName%2CprofilePicture%28displayImage~%3AplayableStreams%29%2CvanityName%29` resulted in a `403 Forbidden` response: {"serviceErrorCode":100,"message":"Not enough permissions to access: GET /me","status":403}

我使用 OpenID Connect 产品获得了在 LinkedIn 上共享和通过 LinkedIn 登录的访问权限。

我已经为其创建了访问令牌。

php laravel linkedin-api laravel-socialite omniauth-linkedin
1个回答
0
投票

该错误表明 LinkedIn API 拒绝请求,因为用户的访问令牌没有访问所请求端点所需的权限。有时,用户可能对其个人资料信息的访问受到限制。您可以检查 LinkedIn 帐户设置是否允许第三方应用程序访问所需数据。

您还可以检查 Laravel Socialite 配置在身份验证过程中是否指定了正确的 LinkedIn 范围。在 linkedin 配置下的 config/services.php 文件中,确保已包含必要的范围。

© www.soinside.com 2019 - 2024. All rights reserved.