Upload Image Binary File for Image Share Returns “Invalid Access Token”

Refresh

2 weeks ago

Views

2 time

0

According to the LinkedIn docs, in order to create an Image Share with the API, you have to first register the Image by using /assets?action=registerUpload. You then use the uploadUrl returned to upload the image as a binary file like this (from the LinkedIn docs):

curl -i --upload-file /Users/peter/Desktop/superneatimage.png --header "Authorization: Bearer redacted" 'https://api.linkedin.com/mediaUpload/C5522AQGTYER3k3ByHQ/feedshare-uploadedImage/0?ca=vector_feedshare&cn=uploads&m=AQJbrN86Zm265gAAAWemyz2pxPSgONtBiZdchrgG872QltnfYjnMdb2j3A&app=1953784&sync=0&v=beta&ut=2H-IhpbfXrRow1'

When I try this with my image and the url that the register upload returned I got "Invalid Access Token." What's going on here? I'm not providing an access token in the second step, and the first step runs fine with the access token I provided it.

0 answers