链接中oauth2 r_liteprofile未从api返回



所以我有一个rails应用程序,我正在将这个gem用于oauth2。现在在linkedin上的开发者控制台上,我只能选择

r_basicprofiler_emailaddressrw_company_adminw_share

所以我选择了r_basicprofile

现在一旦识别linkedin在推送用户到http://localhost:3000/auth/linkedin/callback?error=unauthorized_scope_error&error_description=Scope+%26quot%3Br_liteprofile%26quot%3B+is+not+authorized+for+your+application&state=126bb5cb16613e67f77580954980f86e4a3080c7cb4e56fe

其清楚地请求CCD_ 7。现在由于r_liteprofile是不允许的,它给出了一个回调错误

OmniAuth::Strategies::OAuth2::CallbackError

CCD_ 10。

routes.rb看起来像

get 'login-linkedin', to: redirect('/auth/linkedin')

get 'auth/:provider/callback', to: 'sessions#identify_network_entry'

omniauth.rb看起来像

provider :linkedin, 'KEY', 'VALUE

Oauth2.0的linkedin控制台中的回调url看起来像

http://localhost:3000/auth/linkedin/callback

是否有解决方法,或者这是一个实现缺陷?这种情况不再偶尔发生,所以我认为我犯了一个实现错误。

今天(1月14日)linkedin转换了他们的文档,并允许今天之后创建的所有应用程序自动使用自助部分下的r_liteprofile,但要使用r_basicprofile,您必须应用于他们的合作伙伴程序。

使用r_basicprofile连接到v1 API应该有效,但只能持续到3月1日。

也许你的问题是因为发生了转换。

点击此处阅读更多:

https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq?context=linkedin/consumer/context

截至2019年1月14日,在领英开发者平台上创建的所有新应用程序都可以使用领英的v2 API。

具体来说。。。

我有权访问哪些权限?

LinkedIn v1 API提供了以下一组权限:

r_basicprofile电子邮件地址(_E)w_共享rw_company_admin

接下来,可用的v2 API包括:

r_liteprofile(替换r_basicprofile)电子邮件地址(_E)w_member_social(替换w_share)

和。。。

想要维护对基本配置文件字段的访问权限吗?了解有关申请领英合作伙伴计划的更多信息。

最新更新