LinkedIn API 无法查看_any_ 公司简介
LinkedIn API unable to view _any_ company profile
我想知道如何访问 LinkedIn 上的任何 公司资料。例如,LinkedIn 本身的 REST endpoint API 是:
https://api.linkedin.com/v1/companies/1337?format=json
样本响应为:
{
"id": 1337,
"name": "LinkedIn"
}
但是,在启用 rw_company_admin
的情况下使用 OAuth2 进行身份验证后,我的应用 returns:
{
"errorCode": 0,
"message": "Member 206xxxxxx does not have permission to get company 1337",
"requestId": "G6LNMCEZO8",
"status": 403,
"timestamp": 1432358171348
}
这直到最近才有效。
文档 does note that "In order to perform any of the company page management API calls below, the authenticated LinkedIn user making the requests must be an administrator of the target company." Confusingly, it also says that "The following endpoints are the only ones that will remain available for use... Companies API — /v1/companies/{id}
".
但是,我的目标不是作为管理员管理公司,而是向用户展示公司的简要输出。如何获取公司信息?
他们似乎关闭了该功能。
见https://developer.linkedin.com/support/developer-program-transition
New requirement for Companies API
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.
Your API call will return a 403 Forbidden error if you do not have the
appropriate admin permission to interact with the target company.
在第一行,
On February 12th 2015 we announced a series of changes to our
developer program. These changes have now begun to take affect and
will be rolled out to the entire LinkedIn application base between May
12th - May 19th, 2015.
所以我们运气不好。
要从 LinkedIn 访问公司详细信息,您必须提出经过身份验证的请求(您必须是公司的管理员)。对于经过身份验证的调用,请遵循此 link。 https://developer.linkedin.com/docs/oauth2#!
无论如何,您必须有权限 rw_company_admin 才能访问公司详细信息。为此,您必须在您的应用程序设置中检查默认应用程序权限,同样重要的是要注意,当您请求授权代码时,您必须指定 scope.
使用此方法获取公司的授权码
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=123456789&redirect_uri=https%3A%2F%2Fwww.example.com%2Fauth%2Flinkedin&state=987654321&scope=rw_company_admin
尽管我绝对是公司管理员,但我对此也有疑问。在我将该公司添加为我的个人资料中的当前工作地点后,API 开始按预期响应。
我想知道如何访问 LinkedIn 上的任何 公司资料。例如,LinkedIn 本身的 REST endpoint API 是:
https://api.linkedin.com/v1/companies/1337?format=json
样本响应为:
{
"id": 1337,
"name": "LinkedIn"
}
但是,在启用 rw_company_admin
的情况下使用 OAuth2 进行身份验证后,我的应用 returns:
{
"errorCode": 0,
"message": "Member 206xxxxxx does not have permission to get company 1337",
"requestId": "G6LNMCEZO8",
"status": 403,
"timestamp": 1432358171348
}
这直到最近才有效。
文档 does note that "In order to perform any of the company page management API calls below, the authenticated LinkedIn user making the requests must be an administrator of the target company." Confusingly, it also says that "The following endpoints are the only ones that will remain available for use... Companies API — /v1/companies/{id}
".
但是,我的目标不是作为管理员管理公司,而是向用户展示公司的简要输出。如何获取公司信息?
他们似乎关闭了该功能。
见https://developer.linkedin.com/support/developer-program-transition
New requirement for Companies API
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.
Your API call will return a 403 Forbidden error if you do not have the appropriate admin permission to interact with the target company.
在第一行,
On February 12th 2015 we announced a series of changes to our developer program. These changes have now begun to take affect and will be rolled out to the entire LinkedIn application base between May 12th - May 19th, 2015.
所以我们运气不好。
要从 LinkedIn 访问公司详细信息,您必须提出经过身份验证的请求(您必须是公司的管理员)。对于经过身份验证的调用,请遵循此 link。 https://developer.linkedin.com/docs/oauth2#!
无论如何,您必须有权限 rw_company_admin 才能访问公司详细信息。为此,您必须在您的应用程序设置中检查默认应用程序权限,同样重要的是要注意,当您请求授权代码时,您必须指定 scope.
使用此方法获取公司的授权码
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=123456789&redirect_uri=https%3A%2F%2Fwww.example.com%2Fauth%2Flinkedin&state=987654321&scope=rw_company_admin
尽管我绝对是公司管理员,但我对此也有疑问。在我将该公司添加为我的个人资料中的当前工作地点后,API 开始按预期响应。