0

I trying to receive title and preview image from open graph meta tags via Metascraper framework. When I trying it on post or job url I receive correct answer, but when I trying to receive info about user profile I receive Response code 999 (Request denied)

await (async () => {
        const { body: html, url } = await got(encodeURI(link))
        const metadata = await metascraper({ html, url })
        this.logger.info('result: ',JSON.stringify(metadata))
      })()
Milousel
  • 71
  • 2
  • 12
  • I don't know metascraper: is it generating the 999 code or is LinkedIn? Can you see the request that it's generating to LinkedIn - what specific error code is it getting back, e.g. 400 or 401 or something else? Are you authenticating with the LinkedIn API at all, or just making anonymous requests? – Rup May 04 '20 at 15:36
  • Its anonymous request, this is input link: "https://www.linkedin.com/in/nikola-lej%C4%8Dkov%C3%A1-009189169/" – Milousel May 04 '20 at 15:40
  • Can you check the body of the response you're getting back from LinkedIn? [This old question](https://stackoverflow.com/questions/33425937/why-is-linkedin-api-returning-999-request-failed-message) says that the error message they were getting with a 999 was "Sorry, we are unable to serve your request at this time due to unusual traffic from your network connection." meaning they might have banned API access from your IP. – Rup May 04 '20 at 15:43
  • I just test it with another framework I only receive this: HTTP status 999 – Milousel May 04 '20 at 15:52
  • I've tried it with curl (without specifying an 'Accept', if that makes any difference) and I get an HTML fragment redirecting me to linkedin.com/authwall. So I think the problem here is that you need to be authenticated to make this request. – Rup May 04 '20 at 15:58
  • But I think this is beyond the scope of what we can support on StackOverflow though sorry, and if you think this should work anonymously then you'll need to talk to LinkedIn directly to find out why this isn't working. Or at least I'm not sure how we can be any further help without logs or further information from their end. – Rup May 04 '20 at 16:00
  • 1
    Does this answer your question? [999 Error Code on HEAD request to LinkedIn](https://stackoverflow.com/questions/27231113/999-error-code-on-head-request-to-linkedin) – Mehdi May 04 '20 at 17:33
  • 1
    Read also: https://stackoverflow.com/a/45407138/1006854 – Mehdi May 04 '20 at 17:34

0 Answers0