Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/53.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 无法在用户’;使用'GET/activities'的用户配置文件`_Ruby On Rails_Oauth_Linkedin_Linkedin Api - Fatal编程技术网

Ruby on rails 无法在用户’;使用'GET/activities'的用户配置文件`

Ruby on rails 无法在用户’;使用'GET/activities'的用户配置文件`,ruby-on-rails,oauth,linkedin,linkedin-api,Ruby On Rails,Oauth,Linkedin,Linkedin Api,获取此错误 #100, "message"=>"Not enough permissions to access: GET /activities", "status"=>403}, @response=#, @headers={"x-li-responseorigin"=>["RGW"], "x-restli-gateway-error"=>["true"], "content-type"=>["application/json"], "content-lengt

获取此错误

#100, "message"=>"Not enough permissions to access: GET /activities", "status"=>403}, @response=#, @headers={"x-li-responseorigin"=>["RGW"], "x-restli-gateway-error"=>["true"], "content-type"=>["application/json"], "content-length"=>["99"], "date"=>["Wed, 18 Dec 2019 08:49:46 GMT"], "x-li-fabric"=>["prod-lor1"], "report-to"=>["{\"group\":\"network-errors\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://www.linkedin.com/li/rep\"}],\"include_subdomains\":true}"], "nel"=>["{\"report_to\":\"network-errors\",\"max_age\":1296000,\"success_fraction\":0.00066,\"failure_fraction\":1,\"include_subdomains\":true}"], "x-li-pop"=>["prod-edc2"], "x-li-proto"=>["http/1.1"], "x-li-uuid"=>["TIOrmv5q4RUA16g7nSsAAA=="], "set-cookie"=>["lidc=\"b=OB67:g=1767:u=13:i=1576658986:t=1576741391:s=AQFS3auU0233cAdH3fKSL2EuVQDxEPAf\""], "x-li-route-key"=>["\"b=OB67:g=1767:u=13:i=1576658986:t=1576741391:s=AQFS3auU0233cAdH3fKSL2EuVQDxEPAf\""]}>"""
我在linkedin上发了一篇帖子,作为回应,我得到了一个活动Id
urn:li:activity:6628985933737926656

我试着用它来取

数据URL=“” @token=我过帐时使用的帐户的访问令牌

response = HTTParty.get("#{DATA_URL}/v2/activities?ids=urn:li:activity:6628985933737926656", headers: { 'Authorization': "Bearer #{@token}" })
得到了回应

=> #<HTTParty::Response:0x78e9e30 parsed_response={"serviceErrorCode"=>100, "message"=>"Not enough permissions to access: GET /activities", "status"=>403}, @response=#<Net::HTTPForbidden 403 Forbidden readbody=true>, @headers={"x-li-responseorigin"=>["RGW"], "x-restli-gateway-error"=>["true"], "content-type"=>["application/json"], "content-length"=>["99"], "date"=>["Tue, 04 Feb 2020 05:56:31 GMT"], "x-li-fabric"=>["prod-lor1"], "x-li-pop"=>["prod-edc2"], "x-li-proto"=>["http/1.1"], "x-li-uuid"=>["p47TiGUd8BUQSeGHQSsAAA=="], "set-cookie"=>["lidc=\"b=OB67:g=1845:u=46:i=1580795791:t=1580855512:s=AQFUlGrlMzDtZUOi5wzacLDyR4CkfDGl\""], "x-li-route-key"=>["\"b=OB67:g=1845:u=46:i=1580795791:t=1580855512:s=AQFUlGrlMzDtZUOi5wzacLDyR4CkfDGl\""]}> 
=>#100,“消息”=>“访问权限不足:获取/活动”、“状态”=>403}、@response=#、@headers={“x-li-responseorigin”=>[“RGW”]、“x-restli-gateway-error”=>[“true”]、“内容类型”=>[“应用程序/json”]、“内容长度”=>[“99”]、“日期”=>[“Tue,2020年2月4日05:56:31格林威治标准时间”]、“x-li-fabric”=>[“prodli-pop”]、“prodli-edc2”],“x-li-proto=”>[“http/1.1”],“x-li-uuid=”>[“p47TiGUd8BUQSeGHQSsAAA=”],“设置cookie=”>[“lidc=”b=OB67:g=1845:u=46:i=15807957991:t=15808555512:s=AQFULGRZDUOI5WZACLDYR4CKFL\”],“x-li-route-key=”>[“b=b=67:g=1845:u=46:i=15807957KFLGZDYDYL5WZDYDYL5KFL=15785KFL\”>

您可以发布API文档的链接吗?请提供足够的信息,例如您要使用的API和格式化的错误响应。@MithleshKumar我在其中添加了一些详细信息。