When I'm trying to get the thumbnail for a video using the Videos API, I receive a 500 Internal server error (this video was posted last week on LinkedIn).
I had tried with others videos with mp4 and movs extensions and some of them works and others don’t, on both company and profile. The video from the screenshots is a mp4 and the media id is urn:li:video:D4D05AQEuZHjf3NPyDA (encoded is urn%3Ali%3Avideo%3AD4D05AQEuZHjf3NPyDA)
Request: GET https://api.linkedin.com/rest/videos/urn%3Ali%3Avideo%3AD4D05AQEuZHjf3NPyDA
Response:
{
"message": "Internal Server Error",
"status": 500
}
[get the video]
[get thumbnail for the video]
Related
So I was trying to use the LinkedIn Developer API to post some text with a image or multiple images at once.
So here's the issue
https://learn.microsoft.com/en-gb/linkedin/consumer/integrations/self-serve/share-on-linkedin
This is the DOCS for the share on LinkedIn that is completely working fine when am posting just text.
But the issue arises when I try to create Post with Image
https://api.linkedin.com/v2/assets?action=registerUpload This API is giving me an error like this.
{
"serviceErrorCode": 65600,
"message": "Invalid access token",
"status": 401
}
Even I refreshed the token to check if there was an issue with my token. My access token is working fine with sharing the text-only post.
If your above API works fine in case then you are registered for uploading file. Then you'll receive the below URL from the response. But they mentioned it with CURL and I want to send a cross-origin request from Axios. I tried a curl converter but that doesn't explain how we will upload the file with the request.
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'
I have the file either in URL or in Base64 format. I don't have a binary file present in my case. Well, I want to send a binary file too for a default case but for most requests, I'll be using the URL for the image.
Thanks for reading the whole question. Please help me with the information you have that can be useful for me.
It's a little difficult for me to search for a response to my question because so many people are asking a different question that uses most of the same words.
I'm creating a site on Wix and using their Backend Code platform to create an HTTP endpoint. The HTTP endpoint sends an email to me using nodemailer, a feature which is not available in the browser.
While testing I set the Endpoint to be wide open using these headers.
{
"Accept": 'application/json',
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST, GET, OPTIONS",
"Access-Control-Max-Age": "86400",
"Access-Control-Allow-Headers": "Content-Type"
}
And when I send the fetch request to the HTTP Endpoint on localhost, everything works as expected.
Now, Wix requires custom HTML code to be embedded in an iframe. Developers don't have direct access to the code on their site. When I embed the code with the fetch request into an iframe and click the button to send the fetch request I get blocked by CORs.
I can see, in the Chrome Developer Console that Chrome is sending the fetch request, but along with the first Options request Chrome isn't getting the correct headers from the Endpoint. The request is subsequently blocked.
Is there any reason why being embedded in an iframe would cause this code not to work?
If this is impossible, which I fear, what other way is there to send an email from an iframe?
API Post creation responded with status 201 and with a post id urn:li:ugcPost:6767685388107599872. However, the post is not visible on the network and also it's not possible to retrieve the data of the post.
Retrieve endpoint
GET /v2/ugcPosts/urn%3Ali%3AugcPost%3A6767685388107599872?viewContext=AUTHOR
Response
{
"message": "com.linkedin.restli.server.RestLiServiceException [HTTP Status:404]: com.linkedin.content.common.ResponseException: ",
"status": 404
}
Retrieve endpoint
GET /v2/ugcPosts/urn%3Ali%3AugcPost%3A6767685388107599872
Response
{
"message": "com.linkedin.restli.server.RestLiServiceException [HTTP Status:404]: com.linkedin.content.common.ResponseException: ",
"status": 404
}
There was no issue on the Linkedin status page related to the publishing time 2021-02-17T06:05:34.052Z.
I also tried to publish the exact same content on a different page without any problem.
Do you have any idea what could go wrong?
I am implementing LinkedIn multi-part video upload, and I am constantly getting HTTP 400 on final step to complete upload. So I successfully registered upload, and uploaded all chunks as well, but on final request to complete the upload it always fails with HTTP 400 with no error text.
REQUEST(I have shortened etags):
{"headers":{"Authorization":"Bearer MINE_TOKEN","Content-type":"application\/json","Accept":"*\/*"},"body":{"completeMultipartUploadRequest":{"mediaArtifact":"urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C5605AQFNb8_dDqQmGQ,urn:li:digitalmediaMediaArtifactClass:uploadedVideo)","metadata":"","partUploadResponses":[{"headers":{"ETag":"\/ambry-video\/signedId\/AQHX-ok3ZVEXKbzXbbNc4.bin"},"httpStatusCode":200},{"headers":{"ETag":"\/ambry-video\/signedId\/AQHCRXYeFezDepnlaL9MT1c6ZEtTmbHLZW7l27uW3TB-7Hwp4fhPH3r_gisT7EE.bin"},"httpStatusCode":200},{"headers":{"ETag":"\/ambry-video\/signedId\/AQF6qeurhH4SRX73lH95H4hb8kuk2ewWEZG0M.bin"},"httpStatusCode":200},{"headers":{"ETag":"\/ambry-video\/signedId\/AQEEZ1TRc9-QWyjCwvNB0lA2E.bin"},"httpStatusCode":200},{"headers":{"ETag":"\/ambry-video\/signedId\/AQG0tdOtE.bin"},"httpStatusCode":200},{"headers":{"ETag":"\/ambry-video\/signedId\/AQHclPE.bin"},"httpStatusCode":200},{"headers":{"ETag":"\/ambry-video\/signedId\/ZaABdsrBYs.bin"},"httpStatusCode":200},{"headers":{"ETag":"\/ambry-video\/signedId\/AQGU7oDvN9ssN_w.bin"},"httpStatusCode":200}]}}}
RESPONSE:
HTTP\/2 400 returned for \"https:\/\/api.linkedin.com\/v2\/assets?action=completeMultiPartUpload\
Only thing that I have noticed is empty metadata field in completing the upload, but I have received empty metadata on upload registration, and I have seen that it should be in response while registering upload, at least documentation states so -> https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/vector-asset-api#complete-multi-part-upload
Any help would be wellcome, and if you need some more info please let me know ! Thanks !
I'm trying to send two gifs to Telegram:
First:
https://preview.redd.it/1dsyzqgv3os21.gif?s=c4c426909c653ae159c6bd36a79542245b8dd124
Request link:
https://api.telegram.org/botXXX...XXX/sendAnimation?chat_id=#XXXX&animation=https%3A%2F%2Fpreview.redd.it%2F1dsyzqgv3os21.gif%3Fs%3Dc4c426909c653ae159c6bd36a79542245b8dd124
Second:
https://external-preview.redd.it/LD9iy2VqTJPrkBtOCKE9jBdJA3003epxng2LwOIzBzk.gif?s=75a8452ac1000ef27b7cf95b6535163b8cd671ec
Request link:
https://api.telegram.org/botXXX...XXX/sendAnimation?chat_id=#XXXX&animation=https%3A%2F%2Fexternal-preview.redd.it%2FLD9iy2VqTJPrkBtOCKE9jBdJA3003epxng2LwOIzBzk.gif%3Fs%3D75a8452ac1000ef27b7cf95b6535163b8cd671ec
Despite them being rather similar in their structure, only the first one works.
When I try to send the second request I get:
{
"ok": false,
"error_code": 400,
"description": "Bad Request: failed to get HTTP URL content"
}
Why is that? What can I do to fix it?
This is a problem with Telegram's CDN I believe.
I had made a bot to fetch content from Instagram and upload it on Telegram.
This had happened a lot back then so I implemented a mechanism to fetch the photo using my own server and then send the photo by uploading it rather than passing the direct link to Telegram.
Hope this helps others as well.