通过Linkedin API上传带有受众的CSV文件时,权限错误不足

时间:2017-09-27 15:36:31

标签: linkedin linkedin-api

我尝试上传包含自定义受众群体的CSV文件以进行受众群体匹配。我正在使用与media_type等于ad_segments的Linkedin Media Upload API,就像在api指南https://developer.linkedin.com/docs/guide/v2/ads/account-targeting中一样。我的POST请求

POST https://api.linkedin.com/media/upload?media_type=ad_segments HTTP/1.1
Accept: application/json, application/*+json
Authorization: Bearer {my_token}
Content-Type: multipart/form-data;boundary=U_FM4CX-g_nOF0dM0UGj4G5V_N4DKGA
User-Agent: Java/1.8.0_144
Host: api.linkedin.com
Connection: keep-alive
Content-Length: 21980

--U_FM4CX-g_nOF0dM0UGj4G5V_N4DKGA
Content-Disposition: form-data; name="source"; filename="audience.csv"
Content-Type: text/csv

email
7e27ef2718f1aaddb03936077714a60244e380ef09e27504fcb3184a2af7b6ea
cb39d1f4b7f209e5bb36f72c20aa4c0d0b2ecf7b21d99d5d6cfc4b4c81898b24
.
.
--U_FM4CX-g_nOF0dM0UGj4G5V_N4DKGA--

我得到了

{"serviceErrorCode":100,"message":"Not enough permissions to access media resource","status":403}

我仔细检查了用户是否向该应用授予了rw_ad_campaigns权限,但仍然得到了#34;没有足够的权限"错误。 通过Media Upload API上传图片工作正常。它只是CSV文件,用于匹配不起作用的受众群体。

1 个答案:

答案 0 :(得分:1)

要访问“媒体”控制器/端点,您需要成为LinkedIn“合作伙伴”:

https://www.arangodb.com/arangodb-graph-course/