Getting an unauthorized_scope_error on an existing application with r_liteprofile

时间:2019-01-09 22:24:40

标签: linkedin linkedin-api

We followed this guide: https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq#what-permissions-do-i-have-access-to

All developer applications created on the LinkedIn Developer Portal after January 14, 2019 have access to the LinkedIn v2 API by default. Alternatively, if your developer application has made a successful LinkedIn v1 API request from September 1, 2018 to December 17, 2018, your developer application has immediate access to the v2 API.

We also meet the criteria here regarding successful API requests between that time period.

We made the switch shortly before the holidays(as soon as they sent the announcement) and since the last week, we've started seeing this for new signups:

unauthorized_scope_error | Scope "r_liteprofile" is not authorized for your application 

Should we revert back to r_basicprofile for now?

This is for "Sign in with Linkedin".

This is the GET request: https://www.linkedin.com/oauth/v2/authorization?client_id=XXXX&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Flinkedin%2Fcallback&response_type=code&scope=r_liteprofile+r_emailaddress&state=XXXX

This is the response redirect: 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=XXXX

Thanks!

1 个答案:

答案 0 :(得分:8)

我今天遇到了这个问题,而我所缺少的步骤是我需要将“使用LinkedIn登录”产品添加到我的应用中。

这里的术语很奇怪,但是屏幕截图很有帮助。您需要访问开发人员门户上的“产品”页面(网址为:https://www.linkedin.com/developers/apps/[your应用ID] /产品)

select linkedin app product

执行此操作并批准您的请求后(对我来说是5分钟),那么“身份验证”标签下列出的“ OAuth 2.0范围”将被扩展为包括“ r_emailaddress”和“ r_liteprofile”。